Modern CssCAUTION
paul's fish, bash, git, etc config files. good stuff.
Overview
paul's fish, bash, git, etc config files. good stuff.
dc451f7cdce3OBSERVED · 2026-10-20What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
---
name: modern-css
description: Specialized knowledge for writing modern high-quality CSS. Trigger this skill when starting a new CSS project/file, when the user asks about new CSS features (e.g. Masonry, View Transitions, Container Queries, Scroll-driven animations), or requests refactoring of legacy styles to modern standards.
---
# Modern CSS
This skill provides a reference for writing modern, robust, and efficient CSS.
---
## Layout & Responsive Design
### Container Queries
```css
.card {
container: --my-card / inline-size;
}
@container --my-card (width < 40ch) {
/* Component-based responsive design */
}
@container (20ch < width < 50ch) {
/* Range syntax */
}
```
**Container units:** `cqi`, `cqb`, `cqw`, `cqh` - size relative to container dimensions
**Anchored container queries:** Style positioned elements based on anchor fallback state
```css
.tooltip {
container-type: anchored;
}
@container anchored(top) {
/* Styles when positioned at top */
}
```
### Media Query Range Syntax
```css
@media (width <= 1024px) { }
@media (360px < width < 1024px) { }
```
### Grid Enhancements
- **Subgrid:** Inherit parent grid lines for nested layouts
- **Masonry:** `display: grid-lanes` for Pinterest-style layouts with logical tab order. (Previously proposed as `grid-template-rows: masonry`).
---
## Color & Theming
### Color Scheme & Light-Dark Function
```css
:root {
color-scheme: light dark;
--surface-1: light-dark(white, #222);
--text-1: light-dark(#222, #fff);
}
```
### Modern Color Spaces
```css
/* OKLCH: uniform brightness, P3+ colors */
.vibrant {
background: oklch(72% 75% 330);
}
/* Display-P3 for HDR displays */
@media (dynamic-range: high) {
.neon {
--neon-red: color(display-p3 1 0 0);
}
}
/* Better gradients with in oklch */
.gradient {
background: linear-gradient(
to right in oklch,
color(display-p3 1 0 .5),
color(display-p3 0 1 1)
);
}
```
### Color Manipulation
```css
/* color-mix() */
.lighten {
background: color-mix(in oklab, var(--brand), white);
}
/* Relative color syntax */
.lighter {
background: oklch(from blue calc(l + .25) c h);
background: oklch(from blue 75% c h); /* Set to specific lightness */
}
.semi-transparent {
background: oklch(from var(--color) l c h / 50%);
}
.complementary {
background: hsl(from blue calc(h + 180) s l);
}
```
### Accent Color
```css
:root {
accent-color: hotpink; /* Tints checkboxes, radios, range inputs */
}
```
---
## Typography
### Text Wrapping
```css
h1 {
text-wrap: balance; /* Balanced multi-line headings */
max-inline-size: 25ch;
}
p {
text-wrap: pretty; /* No orphans */
max-inline-size: 50ch;
}
```
### Text Box Trim
```css
h1, p, button {
text-box: trim-both cap alphabetic; /* Optical vertical centering */
}
```
### Fluid Typography
```css
.heading {
font-size: clamp(1rem, 1rem + 0.5vw, 2rem); /* Respects user preferences */
}
```
### Dynamic Viewport Units
- `dvh` / `dvw` - Dynamic (accounts for mobile browser UI)
- `svh` / `svw` - Small (smallest possible viewport)
- `lvh` / `lvw` - Large (largest possible viewport)
---
## Animations & Motion
### Scroll-Driven Animation
```css
/* Animate on scroll position */
.parallax {
animation: slide-up linear both;
animation-timeline: scroll();
}
/* Animate on viewport intersection */
.fade-in {
animation: fade linear both;
animation-timeline: view();
animation-range: cover -75cqi contain 20cqi;
}
```
### View Transitions
**Status:** Baseline Newly Available (Same-document).
Cross-document transitions are in Limited Availability (Chrome/Safari 18.2+).
```css
@view-transition {
navigation: auto; /* Automatically animate page transitions (MPAs) */
}
nav {
view-transition-name: --persist-nav; /* Persist specific elements */
view-transition-class: --site-header; /* Group transitions with classes */
}
/* Style the active transition */
html:active-view-transition {
overflow: hidden;
}
```
**Nested View Transition Groups:** Preserve 3D transforms and clipping during transitions.
### Advanced Easing with linear()
```css
.springy {
--spring: linear(
0, 0.14 4%, 0.94 17%, 1.15 24% 30%, 1.02 43%, 0.98 51%, 1 77%, 1
);
transition: transform 1s var(--spring);
}
```
### @starting-style
```css
.dialog {
transition: opacity .5s, scale .5s;
@starting-style {
opacity: 0;
scale: 1.1;
}
}
```
---
## Custom Properties & Advanced Features
### @property
Type-safe, animatable custom properties:
```css
@property --gradient-angle {
syntax: "<angle>";
inherits: false;
initial-value: 0deg;
}
.animate {
transition: --gradient-angle 1s ease;
&:hover {
--gradient-angle: 360deg;
}
}
```
### Math Functions & calc-size()
**Newly Available:** `calc-size()` allows calculations and transitions on intrinsic sizes (auto, min-content).
```css
/* Finally: Animate to auto height! */
.accordion-content {
height: 0;
overflow: hidden;
transition: height 0.3s ease;
}
.accordion-item.open .accordion-content {
height: calc-size(auto);
}
.radial-layout {
--_angle: calc(var(--sibling-index) * var(--_offset));
translate:
calc(cos(var(--_angle)) * var(--_circle-size))
calc(sin(var(--_angle)) * var(--_circle-size));
}
```
### Tree Counting Functions (Coming Soon)
```css
.staggered {
animation-delay: calc(sibling-index() * .1s);
background-color: hsl(sibling-count() 50% 50%);
}
```
### Conditional CSS with if() (Coming Soon)
```css
.dynamic {
color: if(
style(--theme: dark),
white,
black
);
}
```
---
## Architecture & Organization
### Cascade Layers
```css
@layer reset, design-system, components, utilities;
@import "open-props/colors" layer(design-system);
@import "components/nav/base.css" layer(components.nav);
@layer components.nav.primary {
nav {
position: sticky;
inset-block-start: 0;
}
}
```
Benefits:
- Import third-party CSS with lower specificity
- Organize styles by concern, not selector weight
- Nested layers creaTrust audit
CAUTIONgrade B · trust 87/100 Install with care. The audit found things worth knowing before you trust its output.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | WARN |
| L1 | Static analysis of the code | NA |
| L2 | Instruction surface (what it tells the agent) | WARN |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (6)
bin/dt
bin/git-recent
bin/move-er-replace-with-link
bin/subl
0. BEST: Fetch https://web-platform-dx.github.io/web-features-explorer/groups/ and find the feature in there, then fetch it's detail page.
Gates applied: no_behavioural_pass, no_license.
dc451f7cdce3full audit observations/trust-audit/skill/paulirish__modern-css.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-20 | dc451f7cdce3 | CAUTION | B | 87 | first audit |
Questions
What does the modern-css — paulirish/dotfiles skill do?
paul's fish, bash, git, etc config files. good stuff.
Is modern-css — paulirish/dotfiles safe to install?
With care. The audit graded it B (87/100) and found 6 things worth knowing before you trust this skill, listed below with the exact line each was found on.
What can modern-css — paulirish/dotfiles access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
How current is this page?
The grade is for one exact copy of the source (dc451f7cdce3), read on 2026-10-20. The repository is watched, and a new audit runs when it changes — this is the first audit.
Add this badge to your README
Shows this page's audit result and links back to it. It updates when the audit does.
[](https://modelsatlas.com/skills/paulirish/modern-css/)
Not your listing, or something out of date? Claim or update your listing.