One-click install
npx skills add https://github.com/hschne/pi-stuff --skill css-hschne
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: css
Source: https://github.com/hschne/pi-stuff/tree/main/skills/css
Command: npx skills add https://github.com/hschne/pi-stuff --skill css-hschne

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill eliminates the frustration of writing inconsistent, outdated CSS by providing clear guidance on modern native CSS features, browser quirks, and cross-browser compatibility, removing the need to rely on legacy hacks and unnecessary JavaScript workarounds for common styling tasks.

Core Features & Use Cases

  • Modern Native CSS Guidance: Recommendations for layout, responsive, selector, cascade, color, and motion patterns that replace legacy hacks, JavaScript class toggles, and utility sprawl.
  • Cross-Browser Compatibility Support: Progressive enhancement patterns and @supports guidance to ensure styles work across target browsers while leveraging modern features where supported.
  • Use Case Example: Refactor a legacy card component to use container queries for responsive layout instead of viewport media queries, or use the :has() selector to style form validation states without JavaScript class toggling.

Quick Start

Use the css skill to refactor the existing component styles to use native CSS container queries for responsive layout instead of viewport media queries.

Frequently Asked Questions about css

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

FAQPage Schema
How do I refactor CSS to use modern native features instead of legacy hacks?

Use native CSS container queries for responsive layout instead of viewport media queries, or apply the :has() selector to style form validation states directly, eliminating the need for JavaScript class toggling.

How does the :has() selector work for styling form validation states?

Yes, container queries replace viewport media queries for component-level responsive design. They allow individual components to adapt their layout based on their parent container's dimensions rather than the entire browser viewport.

What is the best way to ensure cross-browser compatible CSS using progressive enhancement?

Cascade layers organize CSS specificity by explicitly defining style priority tiers, preventing unwanted style overrides. This structured approach simplifies maintaining large stylesheets and ensures predictable cascade behavior across complex templates.

When do I need cascade layers and logical properties in modern CSS?

Yes, modern CSS supports reduced motion preferences through the prefers-reduced-motion media query. This allows you to disable or minimize animations and transitions for users who have requested reduced motion in their system settings.

Does modern CSS support reduced motion and accessibility requirements natively?

Modern CSS supports reduced motion requirements natively through the prefers-reduced-motion media query. Combined with logical properties and intrinsic sizing, this ensures accessible styling and progressive enhancement without relying on JavaScript workarounds.

Can I use container queries for responsive design without JavaScript?

You can use container queries for responsive design entirely without JavaScript. They allow components to adapt their layout based on parent container dimensions natively, replacing viewport-dependent media queries and removing the need for JavaScript resize observers.