Skip to content

Ability to change styling of elements inside other component's <slot>  #9133

@LunaeSomnia

Description

@LunaeSomnia

Describe the bug

Scoped styling allows to encapsulate styling for the component it's written in.
However, if you use a <slot> in a Component A, you then use it in some other Component B and fill some elements inside the it, you're able to change how those elements are being rendered in the final output from the Component B.

Reproduction

https://svelte.dev/repl/0111a06f3d4d435f8719e01a09ce0401?version=4.2.0

Logs

No response

System Info

System:
    OS: Linux 6.4 Pop!_OS 22.04 LTS
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-11370H @ 3.30GHz
    Memory: 4.93 GB / 15.30 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.17.1 - /usr/local/bin/node
    npm: 9.6.7 - /usr/local/bin/npm

Severity

annoyance

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