Skip to content

Don't add CSS scoping attribute to elements that don't need it #679

@Rich-Harris

Description

@Rich-Harris

The other side of the #678 coin — there's no sense in adding a svelte-123xyz attribute to an element that doesn't have a corresponding style:

<div>
  <p>this should have the attribute, the parent should not</p>
</div>

<style>
  p {
    color: red;
  }
</style>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions