@instructure/postcss-themeable-styles

7.5.1 • Public • Published

category: packages

postcss-themeable-styles

npm  build-status  MIT License  Code of Conduct

For use with @instructure/babel-plugin-themeable-styles, converts CSS variables into ES template tokens:

Given:

/* style.css */
.root {
  background: var(--background);
  color: var(--color);

  &:hover {
    background: var(--hoverBackground);
    color: var(--hoverColor);
  }
}

Output:

/* style.css */
.root {
  background: ${theme.background};
  color: ${theme.color};

  &:hover {
    background: ${theme.hoverBackground};
    color: ${theme.hoverColor};
  }
}

Installation

yarn add --dev @instructure/postcss-themeable-styles

Usage

postcss([ require('@instructure/postcss-themeable-styles') ])

Keywords

none

Install

npm i @instructure/postcss-themeable-styles

DownloadsWeekly Downloads

1,208

Version

7.5.1

License

MIT

Unpacked Size

25.3 kB

Total Files

5

Last publish

Collaborators

  • kyler-instructure
  • instuici
  • eschiebel
  • maths22
  • jcrystal
  • skacsmark
  • itadmins
  • quizzesuici
  • instructure-toolsmiths-service-user
  • aogata-inst
  • viktor.ohad
  • instout