The PostCSS ecosystem contains over 100 plugins at last count; this is on the increase. These plugins will all serve different needs, but will have one thing in common: the process they use to transform our code.
Now, we should be clear that this similarity is at a very high level; we are not referring to the technical details of each plugin! This aside, when creating our own custom syntax, we must follow a three-step process:
We first put our code through a parser.
We then transform it using anyone of a number of plugins.
We finally stringify it, or convert it to valid CSS in string format.
We already have a handful of plugins that allow us to work with other syntaxes within a PostCSS environment; these include languages such as less or JavaScript:
Name of plugin |
Purpose of plugin |
---|---|
|
This plugin is an indent-based syntax like SASS or Stylus. Plugin is available from https://github.com/postcss/sugarss. |
|