mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 22:26:38 +03:00
Skip unresolved container query CSS
Exclude linked container-query groups when their current applicability cannot be resolved, with a browser regression proving inactive styles do not leak. AI assistance disclosure: This commit was prepared with Codex under maintainer direction.
This commit is contained in:
@@ -1321,6 +1321,13 @@ if (IS_BROWSER) {
|
||||
try { return CSS.supports(condition); }
|
||||
catch { return true; }
|
||||
}
|
||||
if (constructorName === 'CSSContainerRule' || /^\s*@container\b/i.test(rule?.cssText || '')) {
|
||||
// The platform exposes no matchMedia-equivalent for container queries,
|
||||
// and selector matches do not prove that the element's query container
|
||||
// satisfies the condition. Omit the group rather than report styles that
|
||||
// are inactive for the current layout.
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -8225,6 +8225,13 @@ if (IS_BROWSER) {
|
||||
try { return CSS.supports(condition); }
|
||||
catch { return true; }
|
||||
}
|
||||
if (constructorName === 'CSSContainerRule' || /^\s*@container\b/i.test(rule?.cssText || '')) {
|
||||
// The platform exposes no matchMedia-equivalent for container queries,
|
||||
// and selector matches do not prove that the element's query container
|
||||
// satisfies the condition. Omit the group rather than report styles that
|
||||
// are inactive for the current layout.
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user