check_css_specificity
Detects CSS specificity anti-patterns like !important, ID selectors, deep nesting, and inline styles that cause styling issues in web components. Supports CSS and HTML analysis.
Instructions
Detects CSS specificity anti-patterns that cause styling issues with web components — catches !important usage, ID selectors targeting components, deeply nested selectors (4+ levels), and inline style attributes. Supports both CSS and HTML mode. Run this on any CSS or HTML to prevent specificity wars.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The CSS or HTML code to analyze for specificity issues. | |
| mode | No | Analysis mode — "css" checks stylesheets for !important/ID/nesting issues, "html" checks for inline style attributes on web components. Defaults to "css". |