From dc25da80f50cad472dc25f2a7659bb8c99c097cb Mon Sep 17 00:00:00 2001
From: ai
Do not create multitool plugins. Several small, one-purpose plugins bundled into a plugin pack is usually a better solution.
For example, postcss-preset-env
contains many small plugins,
-one for each W3C specification. And cssnano
contains a separate plugin
+one for each W3C specification. And cssnano
contains a separate plugin
for each of its optimization.
Preprocessors libraries like Compass provide an API with mixins.
PostCSS plugins are different.
A plugin cannot be just a set of mixins for postcss-mixins
.
To achieve your goal, consider transforming valid CSS or using custom at-rules and custom properties.
postcss
to peerDependencies
AST can be broken because of different postcss
version in different plugins.
diff --git a/docs/postcss-plugins.html b/docs/postcss-plugins.html
index c2ac3e5..2304f27 100644
--- a/docs/postcss-plugins.html
+++ b/docs/postcss-plugins.html
@@ -18,7 +18,7 @@
and helpers to use as @util
rules.
atcss
contains plugins that transform your CSS according
to special annotation comments.cssnano
contains plugins that optimize CSS size for use in production.cssnano
contains plugins that optimize CSS size for use in production.oldie
contains plugins that transform your CSS
for older Internet Explorer compatibility.rucksack
contains plugins to speed up CSS development
@@ -257,12 +257,12 @@
postcss-resemble-image
provides a gradient fallback for an image that
loosely resembles the original.postcss-resolve-urls
resolves relative urls referenced in url()
spostcss-responsive-images
adds stylesheets for making
+postcss-responsive-images
adds stylesheets for making
your images responsive.postcss-sprites
generates CSS sprites from stylesheets.postcss-svg
insert inline SVG to CSS and allows to manage it colors.postcss-svg-fallback
converts SVG in your CSS to PNG files for IE 8.postcss-svgo
processes inline SVG through SVGO.postcss-svgo
processes inline SVG through SVGO.postcss-unicode-characters
makes it easier to write unicode-range
descriptors.postcss-url
rebases or inlines url()
s.postcss-remove-root
removes all instances of :root
from a stylesheet.postcss-single-charset
ensures that there is one and only one
@charset
rule at the top of file.postcss-zindex
rebases positive z-index
values.postcss-zindex
rebases positive z-index
values.postcss-unprefix
Unprefixes vendor prefixes in legacy CSS.css-byebye
removes the CSS rules that you don’t want.css-mqpacker
joins matching CSS media queries into a single statement.stylehacks
removes CSS hacks based on browser support.stylehacks
removes CSS hacks based on browser support.postcss-mq-optimize
removes invalid media queries or its expressions.postcss-uncss
removes unused CSS from your stylesheets.postcss-html-filter
filters out CSS that does not apply to the HTML
@@ -317,7 +317,7 @@
postcss-deep-scopable
unified deep scoped style for Vue.js.postcss-deadcss
helps to find dead CSS in stylesheets.postcss-variable-compress
minifies css variables and saves you space.See also plugins in modular minifier cssnano
.
See also plugins in modular minifier cssnano
.
postcss-alias
creates shorter aliases for properties.postcss-alias-atrules
creates shorter aliases for at-rules.postcss-all-link-colors
insert colors for link-related pseudo-classes.css2modernizr
creates a Modernizr config file
that requires only the tests that your CSS uses.doiuse
lints CSS for browser support, using data from Can I Use.immutable-css
lints CSS for class mutations.immutable-css
lints CSS for class mutations.list-selectors
lists and categorizes the selectors used in your CSS,
for code review.