Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 528 Bytes

File metadata and controls

40 lines (29 loc) · 528 Bytes

dczajkowski/variables-in-files

Requires variables to be declared in specified files.

Usage

{
  "rules": {
    "dczajkowski/variables-in-files": [["src/styles/variables.css"]]
  }
}

For this config the following applies:

/* This is allowed */

/* in src/styles/variables.css */

:root {
  --color-blue: cornflowerblue;
}

.a {
  --color-white: white;
}

/* This is not allowed */

/* in src/styles/partials/_navbar.css */

:root {
  --color-blue: cornflowerblue;
}

.a {
  --color-white: white;
}