PostCSS Styled Syntax
PostCSS syntax for parsing styled components
Getting Started
First thing's first, install the module:
npm install postcss-styled --save-dev
Use Cases
const postcss = ;const stylelint = ;const syntax = // syntax for parse css blocks (non-required options) css: ;;
input:
;const Title = styledh1` font-size: 1.5em; text-align: center; color: palevioletred;`;
output:
;const Title = styledh1` font-size: 1.5em; text-align: center; color: palevioletred;`;
Advanced Use Cases
See: postcss-syntax
Style Transformations
The main use case of this plugin is to apply PostCSS transformations to CSS code in template literals.