Skip to content

Nested :global selectors #11702

@Rich-Harris

Description

@Rich-Harris

Describe the problem

You can do this:

<style>
  .foo {
    font-size: 2em;
  }

  .foo :global {
    p {
      color: purple;
    }
  }
</style>

It would be nice if you could do this:

<style>
  .foo {
    font-size: 2em;

    :global {
      p {
        color: purple;
      }
    }
  }
</style>

Right now it fails cryptically.

Describe the proposed solution

see above

Importance

nice to have

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions