vscode-css-modules icon indicating copy to clipboard operation
vscode-css-modules copied to clipboard

Support for nested classes (ampersand)

Open TuxGit opened this issue 3 years ago • 3 comments

Add support for nested classes using with postcss, scss plugins.

Sometimes you need to separate the styles for the child container and add prefix for it.

Example

.root { ... }

.label {
    font-size: 1rem;

    &_primary {
        color: green;
    }

    &_sizeSmall {
        font-size: 0.875rem;
    }
}

Expected result autocomplete

styles.label
       label_primary
       label_sizeSmall    

P.S. This case works in WebStorm

TuxGit avatar Jun 15 '21 19:06 TuxGit

Any news on this feature?

saschati avatar Feb 03 '23 11:02 saschati

@clinyong any update?

totodot avatar Apr 22 '23 12:04 totodot

Since CSS nesting came in all major browsers (in Firefox since 117 version /current Beta/) this issue became more and more important

inoyakaigor avatar Aug 03 '23 08:08 inoyakaigor