anandthakker / doiuse

:bomb: Lint CSS for browser support against caniuse database.
MIT License
1.24k stars 51 forks source link

css-variables are ignored #90

Closed ppseprus closed 1 year ago

ppseprus commented 6 years ago

I believe, css-variables are ignored by doiuse.

Steps to reproduce

  1. Create the test.css file with the following content
    :root {
    --foo: red;
    }
    div {
    background-color: var(--foo);
    }
  2. Then, run the following command: doiuse --browsers "ie 6" test.css (for details: https://caniuse.com/#feat=css-variables)

Current behaviour The following error is returned: test.css:1:1: CSS3 selectors not supported by: IE (6) (css-sel3) https://caniuse.com/#feat=css-sel3

Expected behaviour An error for the following feature is also returned by doiuse: https://caniuse.com/#feat=css-variables

Note I've also tried the following code, where no error was returned.

div {
  --foo: red;
  background-color: var(--foo);
}
clshortfuse commented 1 year ago

Fixed in v5.0