mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 14:16:28 +03:00
Preserve unresolved linked CSS selectors
AI assistance disclosure: Codex implemented and verified this fix under maintainer direction.
This commit is contained in:
@@ -1332,7 +1332,12 @@ if (IS_BROWSER) {
|
||||
}
|
||||
const cssText = rule.cssText || '';
|
||||
if (rule.selectorText) {
|
||||
if (selectorNodesForLiveDom(document, rule.selectorText)?.length > 0) parts.push(cssText);
|
||||
const matches = selectorNodesForLiveDom(document, rule.selectorText);
|
||||
// A null result means the DOM selector API cannot resolve the CSSOM
|
||||
// selector (commonly a hostless pseudo-element), not that it is
|
||||
// unused. Keep those valid stylesheet rules; only a definitive empty
|
||||
// result proves that no live element can receive the declaration.
|
||||
if (matches === null || matches.length > 0) parts.push(cssText);
|
||||
continue;
|
||||
}
|
||||
let nested = [];
|
||||
|
||||
Reference in New Issue
Block a user