Skip to content

[css-nesting] Treating nesting as syntactic sugar? #8698

Open
@plinss

Description

@plinss

Disclaimer, I'm not sure I'm actually in favor of this, but I thought I'd throw it out there for discussion.

During the transition period until authors can reliaibly just serve stylesheets containing nesting, authors will either need to transpile their stylesheets into non-nested form, differentially serve nested and non-nested versions, or somehow use a polyfill to convert nested stylesheets into non-nested form for older browsers.

Each of these cases complicates any code that uses the CSSOM to interact with the stylesheet. What if we treated nesting as parse-time syntactic sugar and always generated the CSSOM in the un-nested form?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions