Skip to content

add support for nesting selector #65

@jantimon

Description

@jantimon

today ~76% of all browsers support for css nesting:

CSS Nesting Browser Support
https://caniuse.com/css-nesting
https://developer.mozilla.org/en-US/docs/Web/CSS/Nesting_selector

it would be great if postcss-modules-local-by-default could also add support for nesting.

Today the following valid css code

.foo { &:hover { a_value: some-value; } } 

will throw:

CssSyntaxError: postcss-modules-local-by-default: <css input>:1:8: Selector "&:hover" is not pure (pure selectors must contain at least one local class or id)

I added a possible solution in pr #64

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