styling_preflight
Single-call styling validation that discovers a component's API, resolves CSS references, detects anti-patterns, and provides inline fix suggestions for issues.
Instructions
Single-call styling validation that combines component API discovery, CSS reference resolution, and anti-pattern detection. Returns: the component's full style API surface (parts, tokens, slots), valid/invalid status for every ::part() and token reference, Shadow DOM and theme validation issues with inline fix suggestions (each issue includes a fix object with corrected code + explanation), antiPatterns (component-specific negative examples), a correct CSS snippet, and a pass/fail verdict. Call this ONCE before finalizing any component CSS — fixes are embedded in each issue so you don't need a separate suggest_fix call.
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 validate against the component API. | |
| tagName | Yes | The custom element tag name (e.g. "hx-button"). | |
| htmlText | No | Optional HTML code to validate slot attribute references against the component API. |