Skip to content

var function inside color functions cannot be parsed #196

@digilist

Description

@digilist

Thank you for this library. I just started playing around with it and it works really good so far.

But I just noticed that parsing a rule like the following fails:

a {
    background: rgba(var(--some-rgb) , 0.1);
}

The reason is that the var is inside the rgba function. If strict mode is enabled, this error is given: Token “,” (1) not found. Got “var(-”.

But this is valid CSS, see here for example: https://stackoverflow.com/a/41265350/1044527

UPDATE: fails also for rgb(var(--some-rgb))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions