* Register a static variant like `hover`.
(
name: string,
selectors: string[],
{ compounds }: { compounds?: Compounds } = {},
)
| 356 | * Register a static variant like `hover`. |
| 357 | */ |
| 358 | function staticVariant( |
| 359 | name: string, |
| 360 | selectors: string[], |
| 361 | { compounds }: { compounds?: Compounds } = {}, |
| 362 | ) { |
| 363 | compounds = compounds ?? compoundsForSelectors(selectors) |
| 364 | |
| 365 | variants.static( |
| 366 | name, |
| 367 | (r) => { |
| 368 | r.nodes = selectors.map((selector) => rule(selector, r.nodes)) |
| 369 | }, |
| 370 | { compounds }, |
| 371 | ) |
| 372 | } |
| 373 | |
| 374 | staticVariant('*', [':is(& > *)'], { compounds: Compounds.Never }) |
| 375 | staticVariant('**', [':is(& *)'], { compounds: Compounds.Never }) |
no test coverage detected