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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"cssText": "<cssText>",
"tagName": "<tagName>"
},
"name": "check_css_scope"
}
}Input 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"). |