Skip to content

[selectors] Add selector match custom element #10407

Open
@mantou132

Description

@mantou132

e.g: :custom-element

This pseudo-class can make the @socpe style not affect the content of the custom element:

<style>
@scope (.main) to (:custom-element) {
  p { /** **/ }
}
</style>
<p>my content</p>
<any-custom-element>
  <p>component or third-party content</p>
</any-custom-element>

StackOverflow issue: https://stackoverflow.com/questions/31480950/custom-element-selector

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions