JSPM

postcss-shared-options

0.1.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q60426F
  • License MIT

PostCSS plugin Share variables between different css files with scope

Package Exports

  • postcss-shared-options

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (postcss-shared-options) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

PostCSS Shared Options

Build Status npm version

PostCSS plugin share variables between different css files with scope.

/* vars.css */
:root {
  --root-width: 25px;
}
@shared --root-width from "./vars.css";
.foo {
    width: var(--root-width);
    height: calc(var(--root-width) * 2);
}
:root {
  --root-width-<md5_hash>: 25px;
}
.foo {
  width: var(--root-width-<md5_hash>);
  height: calc(var(--root-width-<md5_hash>) * 2);
}

Usage

postcss([ require('postcss-shared-options') ])

See PostCSS docs for examples for your environment.