resolve_css_api
Resolves ::part(), CSS custom properties, and slot references in CSS code against actual component API data, validating each reference and suggesting alternatives for invalid ones.
Instructions
Resolves every ::part(), CSS custom property, and slot reference in agent-generated code against the actual component CEM data. Returns a structured report showing which references are valid, which are hallucinated, and suggests the closest valid alternatives. Call this BEFORE shipping any CSS to verify that every part name, token name, and slot name actually exists on the target component.
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 resolve against the component API. | |
| tagName | Yes | The custom element tag name (e.g. "sl-dialog"). | |
| htmlText | No | Optional HTML code to validate slot attribute references against the component API. |