-
-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
Great lib! A few issues and suggestions, all revolving around some valid CSS selectors.
First, I'd like to be able to specify something like this and have it available to all elements:
[data-card-variant="primary"] {
background-color: green;
color: white;
}
On it's own it generates nothing.
When there is a selector above it, it merges it:
button {
border-radius: 1rem;
&[data-variant="primary"] {
color: white;
}
}
[data-card-variant="primary"] {
background-color: green;
color: white;
}
Sticks them all on button:
interface Mist_button extends ReactHTMLProps<'button'> {
'data-variant'?: 'primary'
'data-card-variant'?: 'primary'
}
I tried a few different ways to select multiple elements.
Nothing is generated for for this:
[data-card-variant="primary"]:is(div, article, section) {
color: white;
}
This one generates the interfaces for all elements, but only applies it to the last one:
*:is(div, article, section)[data-card-variant="primary"] {
color: white;
}
interface Mist_div extends ReactHTMLProps<'div'> {
}
interface Mist_article extends ReactHTMLProps<'article'> {
}
interface Mist_section extends ReactHTMLProps<'section'> {
'data-card-variant'?: 'primary'
}
As does this:
article,
div,
section {
&[data-card-variant="primary"] {
color: white;
}
}
I did get this to work, but it's not very scalable:
div[data-card-variant="primary"],
article[data-card-variant="primary"],
section[data-card-variant="primary"] {
color: white;
}
sohcfst, karlguillotte and nicjrichDEV
Metadata
Metadata
Assignees
Labels
No labels