Support for multiple selectors in one key
brandongregoryscott opened this issue · 0 comments
brandongregoryscott commented
After doing some work in Evergreen to port over existing usages of selectors w/ glamor to the new selectors
prop, I noticed there's a few cases where multiple selectors are defined for a single style object, which isn't really something I tested/accounted for in the original implementation, i.e.
const animationStyles = {
'&[data-state="entering"], &[data-state="entered"]': {
animation: `${openAnimation} ${ANIMATION_DURATION}ms ${animationEasing.spring} both`
}
}
This simple case may "seem" to work in the current implementation (see Comma-separated selectors example), however without the classname prepended, this results in a lower specificity and leaked styles: Incorrect comma-separated selectors example