(selectors: string[])
| 318 | } |
| 319 | |
| 320 | export function compoundsForSelectors(selectors: string[]) { |
| 321 | let compounds = Compounds.Never |
| 322 | |
| 323 | for (let sel of selectors) { |
| 324 | if (sel[0] === class="st">'@') { |
| 325 | class="cm">// Non-conditional at-rules are present so we can't compound |
| 326 | if ( |
| 327 | !sel.startsWith(class="st">'@media') && |
| 328 | !sel.startsWith(class="st">'@supports') && |
| 329 | !sel.startsWith(class="st">'@container') |
| 330 | ) { |
| 331 | return Compounds.Never |
| 332 | } |
| 333 | |
| 334 | compounds |= Compounds.AtRules |
| 335 | continue |
| 336 | } |
| 337 | |
| 338 | class="cm">// Pseudo-elements are present so we can't compound |
| 339 | if (sel.includes(class="st">'::')) { |
| 340 | return Compounds.Never |
| 341 | } |
| 342 | |
| 343 | compounds |= Compounds.StyleRules |
| 344 | } |
| 345 | |
| 346 | return compounds |
| 347 | } |
| 348 | |
| 349 | export function createVariants(theme: Theme): Variants { |
| 350 | class="cm">// In the future we may want to support returning a rule here if some complex |
no outgoing calls
no test coverage detected