rt-tools-styling

Enforces repository-specific styling rules for Angular UI kit SCSS files, tokens, themes, and cascade layers.

1|Updated Jan 14, 2024
One-click install
npx skills add https://github.com/Eyhenij/rt-tools --skill rt-tools-styling-eyhenij
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rt-tools-styling
Source: https://github.com/Eyhenij/rt-tools/tree/main/.claude/skills/rt-tools-styling
Command: npx skills add https://github.com/Eyhenij/rt-tools --skill rt-tools-styling-eyhenij

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Editing a UI kit's SCSS without knowing the repository's own conventions leads to silent defects: media query thresholds that diverge from the breakpoints service, hardcoded values that bypass design tokens, state styles that lose to styling variants, and rules placed outside the cascade layer that consumers cannot override. This Skill supplies the tree-specific styling rules that generic BEM guidance cannot cover. ## Core Features & Use Cases - Token and theme governance: Rules for design tokens, component-level custom properties (--rt-<block>-<what>), dark theme ordering, styling presets, and contrast thresholds across all four looks. - Cascade layer discipline: Requirements for wrapping component styles in rt-kit.components, declaring sublayer order in advance, and marking deliberate layer escapes with rt-layer-outside. - Responsive threshold consistency: Guidance on keeping the narrow-screen media query aligned with the breakpoints service and choosing the right threshold kind for snapshot tests. - Use Case: When editing a component's *.scss in the rt-tools workspace, apply this Skill together with the styling-bem rule so checks like pnpm run check:tokens-styles and pnpm run check:cascade-layer pass and visual regressions are avoided. ## Quick Start Ask the AI to review or edit a kit component's SCSS file while applying the rt-tools-styling rules together with the styling-bem rule.

Frequently Asked Questions about rt-tools-styling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I style an Angular UI kit component with design tokens?

Declare a component-level custom property named `--rt-<block>-<what>` in the block's root with the token step as its default value, then reference it instead of raw values. Modifiers reassign the property rather than repeating CSS declarations, and the tokens check validates this via stylelint.

What is the correct way to use CSS cascade layers in a component library?

Wrap each component style file entirely in the `rt-kit.components` sublayer and declare the sublayer order in advance with `@layer rt-kit.vendor, rt-kit.base, rt-kit.components`. Rules fighting layerless third-party CSS go outside the layer with an `rt-layer-outside` comment.

Why does my disabled button style lose to a styling variant?

State blocks must be placed below every styling variant and palette of the same block, because equal-specificity rules resolve by file order. Raising specificity instead of reordering breaks consumer overrides and other properties unintentionally.

How do I keep media query breakpoints consistent with a breakpoints service?

Write the narrow-screen threshold once as a media query in styles and once via the breakpoints service, then verify with measurements on both sides of the threshold. Template conditions should only control behavior CSS cannot express, not styling.

When should a styling rule live outside the cascade layer?

Only when it disputes a layerless rule from a foreign library, since layerless rules beat layered ones regardless of specificity. Move just the disputed properties out, keep the rest layered, and add a machine-readable `rt-layer-outside` explanation.