5.1.4 • Published 7 years ago

stylecow-plugin-variables v5.1.4

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

stylecow plugin variables

Build Status

Stylecow plugin to work with variables using the standard var(), available in CSS Custom Properties for Cascading Variables Module Level 1.

For global variables (available in all properties), you have to define them in the selectors :root or html. Use nested rules to create scoped variables.

:root {
    --mycolor: red;
}

.foo {
    color: var(--mycolor);
}

.foo h2 {
    --mycolor: blue;

    color: var(--mycolor);
    font-size: var(--mySize, 24px);
}

And stylecow converts to:

.foo {
    color: red;
}

.foo h2 {
    color: blue;
    font-size: 24px;
}

More demos in the tests folder

5.1.4

7 years ago

5.1.3

7 years ago

5.1.2

7 years ago

5.1.1

8 years ago

5.1.0

9 years ago

5.0.0

9 years ago

4.2.0

9 years ago

4.1.2

9 years ago

4.1.1

9 years ago

4.1.0

9 years ago

4.0.0

9 years ago

3.0.0

9 years ago

2.0.4

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago