check_css_scope
Detects CSS custom properties placed on :root, html, body, or * selectors instead of the component host element, preventing scoping issues in shadow DOM.
Instructions
Detects when component-scoped CSS custom properties are set at the wrong scope. Catches component tokens placed on :root, html, body, or * selectors instead of on the component host element. Component tokens only take effect when set on the host — setting them on :root has no effect through shadow DOM.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cssText | Yes | The CSS code to check for scope mismatches. | |
| tagName | Yes | The web component tag name (e.g. "sl-button"). |