Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[cssom] should custom properties be exposed on computed style declarations? #1316

@heycam

Description

@heycam

https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle

The spec currently says that the list of declarations that a CSSStyleDeclaration returned by getComputedStyle includes only "supported CSS properties", which means that it doesn't include custom properties. I think it makes sense to expose these through computed style objects.

Gecko does this, both via item() and getPropertyValue(). For item() (and the indexed getter) custom properties appear after all of the built-in properties, sorted by the order that they happen to cascade in (though that should probably become lexicographically sorted or something).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions