.cursor/skills/nested-css-selectors/SKILL.md
Implements CSS nesting and advanced selectors with progressive enhancement and maintainable specificity. Use when writing or refactoring nested CSS, or when the user mentions :has, :is, :where, :not, or complex selector composition.
npx skillsauth add rogie/figui3 nested-css-selectorsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Write modern, readable CSS using nesting and selector composition without breaking fallback behavior or creating specificity traps.
:where(...)) for reusable component styles.@supports selector(...) when needed.& explicitly for pseudo-classes, variants, and stateful modifiers..card {
padding: 12px;
&__title {
font-weight: 600;
}
&:hover {
background: var(--figma-color-bg-secondary);
}
}
:is(...) to group alternatives without repeating declarations.:where(...) when you want grouping with near-zero specificity cost.:has(...) for parent/state relationships that previously required JS classes.:not(...) small and explicit; avoid broad negative matching..field :is(input, select, textarea) {
font: inherit;
}
.panel :where(button, [role="button"]) {
cursor: pointer;
}
/* baseline behavior */
.form-row {
border: 1px solid var(--figma-color-border);
}
/* enhanced behavior only where supported */
@supports selector(.form-row:has(input:focus-visible)) {
.form-row:has(input:focus-visible) {
border-color: var(--figma-color-border-selected);
}
}
:where(...).:is(...) or :where(...) where intent matches.:has(...) usage is support-gated when compatibility matters.:where for low-cost overrides).development
Guides creation and refinement of Figma-style property panel patterns ("PropKit") using FigUI3 components. Applies when building or modifying property fields in the playground app (`/propkit` route), generating consistent field prompts, composing horizontal `fig-field` rows, or tuning panel UX for controls like image, color, fill, slider, switch, dropdown, segmented control, easing, and angle.
tools
Guides development and maintenance of the FigUI3 web components library for Figma-style plugin UIs. Applies when adding or modifying `fig-*` custom elements, updating docs/demo pages, adjusting theme tokens, improving accessibility, or debugging component behavior in `fig.js`, `components.css`, `index.html`, and `README.md`.
development
Guides creation and refinement of Figma-style property panel patterns ("PropKit") using FigUI3 components. Applies when building or modifying property fields in the playground app (`/propkit` route), generating consistent field prompts, composing horizontal `fig-field` rows, or tuning panel UX for controls like image, color, fill, slider, switch, dropdown, segmented control, easing, and angle.
tools
Guides development and maintenance of the FigUI3 web components library for Figma-style plugin UIs. Applies when adding or modifying `fig-*` custom elements, updating docs/demo pages, adjusting theme tokens, improving accessibility, or debugging component behavior in `fig.js`, `components.css`, `index.html`, and `README.md`.