after doing a bit of research, I could not find information regarding the usage of attribute selectors (that is, [attr=value]
) in styled-components. however, I still imagine it is highly possible for styled-components to support attribute selectors... but should it not, what are some equivalents of it?
for instance, if I have the code below
.squares li[data-level='1'] {
background-color: var(--light);
}
.squares li[data-level='2'] {
background-color: var(--medium);
}
.squares li[data-level='3'] {
background-color: var(--dark);
}
.squares li[data-level='4'] {
background-color: var(--darkest);
}
how do I achieve it via styled-components
?