Skip to content

Slots, and situations in which to use <ClearSlots>? #2955

Answered by reidbarber
bstro asked this question in Q&A
Discussion options

You must be logged in to vote

The best description is probably from #220 (comment), in the original PR by @snowystinger:

More info on ClearSlots:
Was thinking, slots is a bit pervasive, in a dialog, it applies specific styles to the Divider. If someone wanted to make a two column layout in their content and use a Divider, they'd need to do some work to get rid of the class name the dialog applies.
My thought was to start by just having the semantic element always clear the slots context because I don't think we typically want to reach into that region of anything with our styles.
This is also a convenience component to stop slots context propagation

Basically, slots bring opinions, which is super useful, but sometim…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bstro
Comment options

Answer selected by bstro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants