Skip to content

Conversation

@brandongregoryscott
Copy link
Contributor

Resolves #124

One thing to note about this implementation is the lack of any sanitization/trimming of each "part" of the selector. This means the whitespace that is before a selector will be maintained - [data-foo] is not the same as [data-foo]. I originally implemented it in a way that would trim each part, but that approach seemed a little too opinionated (and isn't what glamor does anyway). So the example in the issue should actually be slightly tweaked to have the space removed for the intended effect:

const animationStyles = {
-  '&[data-state="entering"], &[data-state="entered"]': {
+  '&[data-state="entering"],&[data-state="entered"]': {
    animation: `${openAnimation} ${ANIMATION_DURATION}ms ${animationEasing.spring} both`
  }
}

@brandongregoryscott brandongregoryscott merged commit ef1cbea into segmentio:master Nov 29, 2022
@brandongregoryscott brandongregoryscott deleted the support-comma-separated-selectors branch November 29, 2022 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for multiple selectors in one key

2 participants