-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
- rethink this feature, and decide whether to reinstate it:
Composition with pseudoselectors
Sometimes you have an atom that you want to compose, but within the scope of a pseudoselector. Traditionally, if you wanted to change the classes applied to an element on hover, you'd need to do that with javascript.
cmz.pseudo allows us to create new atoms from old ones that are wrapped in a pseudoselector. For example:
// say we've got an existing atom:
const pinkFancyText = cmz(`
color: hotpink
font-style: italic
`)
// but we only want our element to be pink and fancy when it is hovered:
const elemStyle = cmz([`
width: 500px
`,
cmz.pseudo('hover', pinkFancyText)
])Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels