Skip to content

Complex composable variants #15359

Answered by tmvnkr
tmvnkr asked this question in Help
Dec 10, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Thanks for your answer, it got me on the right track.
I had to put slot=icon in double square brackets for it to work, I don't know if that is intended.

Single square brackets:

has-[slot=icon]:not-has-data-[slot=text]:px-0

Outputs:

.has-\[slot\=icon\]\:not-has-data-\[slot\=text\]\:px-0 {
    &:has(*:is(slot=icon)) {
        &:not(*:has(*[data-slot="text"])) {
            padding-inline: calc(var(--spacing) * 0);
        }
    }
}

Double square brackets:

has-[[slot=icon]]:not-has-data-[slot=text]:px-0

Outputs

.has-\[\[slot\=icon\]\]\:not-has-data-\[slot\=text\]\:px-0 {
    &:has(*:is([slot=icon])) {
        &:not(*:has(*[data-slot="text"])) {
            padding-inline: calc(var(--spacing) * 

Replies: 1 comment 1 reply

Comment options

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

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