Skip to content

CSS Custom Properties not supported #89

@jcousins-ynap

Description

@jcousins-ynap

CSS Custom properties are ignored as are the rules which use them.

const
  cssstyle = require('cssstyle'),
  customProp = new cssstyle.CSSStyleDeclaration(),
  normalProp = new cssstyle.CSSStyleDeclaration();

customProp.cssText = `--hello-world: blue; background: var(--hello-world);`
console.log(customProp.background) // "" -- ❌ expected "blue"

normalProp.cssText = `background: blue;`
console.log(normalProp.background) // "blue" -- ✅

Unlike the CSS color names PR, I have no idea how to resolve this issue.
I don't mind contributing to solve this issue, but I will likely need some help.

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