@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') ])

Readme

Keywords

none

Package Sidebar

Install

npm i @instructure/postcss-themeable-styles

Weekly Downloads

5,105

Version

7.5.1

License

MIT

Unpacked Size

25.3 kB

Total Files

5

Last publish

Collaborators

  • bpjatacsuk
  • ajmal-esa
  • razorsh4rk
  • david.wenzlick.inst
  • robinkuss64
  • ardena
  • jcflow
  • jguardadom
  • jdewar
  • xcudder
  • ericsaupe
  • joyenjoyer
  • omarpr
  • cguanzon-inst
  • sarahgerard
  • jacksonhowe
  • jakeoeding
  • camray
  • cjs118
  • matyas.szabo
  • herrtopi
  • angela.gomba
  • kyler-instructure
  • instuici
  • eschiebel
  • maths22
  • jcrystal
  • skacsmark
  • itadmins
  • quizzesuici
  • instructure-toolsmiths-service-user
  • aogata-inst
  • instout