Agent skill

Modern CSS Skill: A Snippet Reference for Current Stylesheets

The modern-css skill hands an AI coding agent a CSS reference: container queries, OKLCH color, scroll-driven animation, anchor positioning, cascade layers and a Baseline habit for checking browser support.

Install
git clone https://github.com/paulirish/dotfiles.git
View on GitHub

Stars, license and last push from GitHub. Install count as reported by the open skills directory.

What is the modern-css skill?

The modern-css skill is a single SKILL.md inside the paulirish/dotfiles repository. It gives an agent a snippet reference for current CSS across layout, color, type, motion, forms and architecture, with a rule to check Baseline status. It writes styles, not pages, and the repository lists no license.

The modern-css skill is a CSS cheat sheet written for an agent. Its description says to load it when starting a new CSS file, when you ask about features such as Masonry or View Transitions, or when legacy styles need modernizing.

It lives in an agents/skills folder of a personal dotfiles repository, next to shell and git configuration. The folder holds one SKILL.md and a reference file from a 2025 conference deck, and the skill itself is almost all code snippets.

Topics the reference covers

  • Layout: container queries and units, media query range syntax, subgrid and a grid-lanes Masonry layout.
  • Color: light-dark(), OKLCH, Display-P3, color-mix(), relative color syntax and accent-color.
  • Type: text-wrap balance and pretty, text-box trim, clamp() fluid sizes and dynamic viewport units.
  • Motion: scroll-driven animation, view transitions, linear() easing, @starting-style, @property and calc-size().
  • Components and forms: dialog, popover, anchor positioning, customizable select, field-sizing and user-invalid.

Support checking is part of the method

  1. Find the feature in the web platform Baseline explorer and read its detail page, which the skill marks as the best source.
  2. Otherwise check the Baseline badge on Can I Use, in the MDN compatibility table or in web.dev articles.
  3. Wrap the newest features in @supports and respect reduced motion, color scheme and contrast preferences.

Who the modern-css skill is for

Best for

  • Starting a stylesheet from scratch and wanting the agent to reach for current features instead of float-era habits.
  • Refactoring older components toward container queries, cascade layers and logical properties. Related theming ideas are in color-system.
  • Fluid type and spacing work, where typography-scale adds the scale decisions that this reference leaves open.

Not for

  • Choosing a visual style. The skill gives syntax, not taste, so pair it with motion-system for motion decisions.
  • Teams that must support old browsers without checking. Several entries are marked limited availability or coming soon.
  • A bundled, licensed package. It is one folder in a personal dotfiles repository, and the license is not stated.

Use it with UiChemy

The skill writes CSS, not WordPress pages. Build the page with Figma to WordPress or AI to WordPress, then use the reference if you add custom CSS yourself. Click Get Started on uichemy.com, and check browser support before shipping any new feature.

Theming advice fits with dark-mode-design, and responsive thinking with owl-responsive-design. The skill's container query and light-dark examples are good starting points for planning both before you build.