This repository was archived by the owner on Dec 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +25
-13
lines changed Expand file tree Collapse file tree 1 file changed +25
-13
lines changed Original file line number Diff line number Diff line change @@ -37,28 +37,40 @@ _Features are enabled by default: no key means feature is enabled_. Keys can be
3737
3838``` js
3939// eg: disable custom properties support
40- var output = cssnext (input, {
41- features: {
42- customProperties: false
43- }
44- })
40+
41+ var postcss = require (" postcss" )
42+ var cssnext = require (" postcss-cssnext" )
43+
44+ postcss ([
45+ cssnext ({
46+ features: {
47+ customProperties: false
48+ }
49+ })
50+ ])
4551```
4652
4753Each feature is based on PostCSS plugins & can get its own options.
4854To pass options to a feature, you can just pass an object to the feature:
4955
5056``` js
5157// eg: pass variables
52- var output = cssnext (input, {
53- features: {
54- customProperties: {
55- variables: {
56- mainColor: " red" ,
57- altColor: " blue" ,
58+
59+ var postcss = require (" postcss" )
60+ var cssnext = require (" postcss-cssnext" )
61+
62+ postcss ([
63+ cssnext ({
64+ features: {
65+ customProperties: {
66+ variables: {
67+ mainColor: " red" ,
68+ altColor: " blue" ,
69+ }
5870 }
5971 }
60- }
61- } )
72+ })
73+ ] )
6274```
6375
6476## ` warnForDuplicates `
You can’t perform that action at this time.
0 commit comments