8000 Top level selector · Issue #10 · pazams/postcss-scopify · GitHub
Skip to content

Top level selector #10

Description

@iefserge

Thank you, this module is awesome!

Wrapping selectors into class scope works well, but I haven't found a way to add styles at the top-level, i.e. to the scope directly.

Would it be a good idea to add support for a top-level & selector that resolves directly to the scope?

like

& {
  color: red;
}
.selector {
  color: green;
}

transforms into:

.scope {
  color: red;
}
.scope .selector {
  color: green;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions