check_shadow_dom_usage
Scan CSS code for Shadow DOM anti-patterns including descendant selectors piercing boundaries, ::slotted() misuse, invalid ::part() chaining, !important on tokens, unknown part names, and typo detection to catch mistakes before production.
Instructions
Scans consumer CSS code for Shadow DOM anti-patterns — descendant selectors piercing shadow boundaries, ::slotted() misuse, invalid ::part() chaining, !important on tokens, unknown part names, and typo detection. Run this on any CSS targeting web components to catch mistakes before they reach production.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| libraryId | No | Optional library ID to target a specific loaded library instead of the default. | |
| cssText | Yes | The CSS code to scan for Shadow DOM anti-patterns. | |
| tagName | No | Optional tag name to scope checks. When provided, enables CEM-based validation (unknown parts, typo detection). |