Skip to content

(Optional) support for nested selectors #61

@maxnordlund

Description

@maxnordlund

First off, thanks for writing this plugin, it's amazing. It supports pretty much everything I throw at it save nesting.

I know you have removed support for SCSS in #53, but I was wondering you would consider adding support for nested selctors? This may be behind some sort of flag/option, let g:css3_nesting = 1, but would be very useful none then less.

The nesting I'm referring to is not the full-blown one from SASS/SCSS/LESS but rather the proposal linked above. So something like:

article section {
    & h1, & h2, & h3
    & h4, & h5 & h6 {
        &:target {
            font-weight: bolder;
        }
    }
}

But note that & has to prefix every selector, so no .disabled & or .&-disabled. That's about it. I tried to do it myself, but Vim's syntax files are might confusing, and I was hoping you might be able to help.

For reference I'm using https://preset-env.cssdb.org/ with https://github.com/jonathantneal/postcss-nesting enabled.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions