Skip to content

Cannot use simple vars value for setting CSS variable #109

@winston0410

Description

@winston0410

I tried to set simple vars as CSS variable, but it doesn't work:

$blue:   #056ef0;

:root{
  --color: $blue;
}

It will gives an error like this:

Syntax Error: SyntaxError                                                      friendly-errors 20:24:33

(1:1) <css input> Unknown word

> 1 | $blue
    | ^

Is this by design?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions