css-features

Guide modern CSS features for OKLCH tokens, container queries, and selectors.

9|Updated Jan 18, 2025
One-click install
npx skills add https://github.com/TheNordicOne/ngx-formbar --skill css-features
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: css-features
Source: https://github.com/TheNordicOne/ngx-formbar/tree/main/.claude/skills/css-features
Command: npx skills add https://github.com/TheNordicOne/ngx-formbar --skill css-features

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents inconsistent or fragile styling by guiding you to use modern, interoperable CSS features when designing color systems and responsive component layouts.

Core Features & Use Cases

  • OKLCH color tokens: Build your theme around oklch() and relative color syntax for predictable adjustments to lightness, chroma, and hue.
  • Container queries: Prefer component-scoped responsiveness with container-type: inline-size and container query units instead of global media-query breakpoints.
  • Modern selectors and layout polish: Use :has() for parent/ancestor styling based on child state and apply small typographic improvements like text-wrap: balance/pretty.

Quick Start

Update your .scss or .css files to define colors as oklch CSS variables, switch component responsiveness to container queries, and use :has() and @layer where they improve selector logic and cascade control.

Frequently Asked Questions about css-features

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

FAQPage Schema
How do I use OKLCH color tokens in CSS for theme design?

Use OKLCH color tokens in CSS by defining colors as CSS variables using the oklch() function. This ensures predictable adjustments to lightness, chroma, and hue while enforcing constraints to avoid hex, rgb, and hsl values.

What is the best way to style parent elements based on child state in CSS?

Use the modern CSS :has() selector to style parent or ancestor elements based on child state. This provides reliable selector logic without requiring extra classes or JavaScript, ensuring consistent component styling.

Should I use color-mix() for relative color manipulation in CSS?

Avoid using color-mix() for channel manipulation. Instead, use relative color syntax with oklch() tokens to reliably adjust lightness, chroma, and hue while maintaining a consistent color system.

How do I control CSS cascade specificity with modern features?

Control CSS cascade specificity using @layer rules. This modern feature organizes styles into distinct layers, preventing selector conflicts and ensuring reliable styling logic across your stylesheets.

Can I use container queries and text-wrap properties in .scss files?

Yes, you can update .scss or .css files to use container queries and text-wrap properties like balance and pretty. These Baseline 2024 capabilities ensure interoperable and reliable responsive component layouts.