Skip to content

Extract parsed CSS property value definitions #494

@foolip

Description

@foolip

Back #113 (comment), @tidoust pointed out that reffy parses CSS value definitions and saves the result in a parsedValue in crawl.json, which for properties happens here:

Object.entries(result.css.properties || {}).forEach(([prop, dfn]) => {
if (dfn.value || dfn.newValues) {
try {
dfn.parsedValue = cssDfnParser.parsePropDefValue(
dfn.value || dfn.newValues);
} catch (e) {
dfn.valueParseError = e.message;
}
}
});

In order to test CSS property keyword values for BCD, it would be convenient to have this extracted into webref, or perhaps if css-grammar-parser.js was published as a standalone parser which one could use together with webref.

#110 has a burndown list of remaining syntax issues, but getting everything to 100% isn't necessary in order to provide value here.

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