postcss-for-css-vars

1.2.2 • Public • Published

PostCSS For Var Plugin

[PostCSS] plugin that enables @for loop syntax in your CSS with var.

Usage

postcss([ require('postcss-for-css-vars') ])
@for --i from 1 to 3 {
    .col-var(--i) { width: var(--i)px; }
}
.col-1 {
    width: 1px
}
.col-2 {
    width: 2px
}
.col-3 {
    width: 3px
}

This plugin must be set after postcss-nested and before postcss-css-variables/postcss-custom-properties.

See PostCSS docs for examples for your environment.

/postcss-for-css-vars/

    Package Sidebar

    Install

    npm i postcss-for-css-vars

    Weekly Downloads

    6

    Version

    1.2.2

    License

    MIT

    Unpacked Size

    4.43 kB

    Total Files

    5

    Last publish

    Collaborators

    • ivan_kushchenko