Socket
Socket
Sign inDemoInstall

stylecow-plugin-variables

Package Overview
Dependencies
0
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    stylecow-plugin-variables

Stylecow plugin to work with variables using standard var() function


Version published
Weekly downloads
5
decreased by-83.33%
Maintainers
1
Install size
34.3 kB
Created
Weekly downloads
 

Readme

Source

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

FAQs

Last updated on 20 Aug 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc