Index of every page on this site: llms.txt
All skills
vojtaholik avatar

/good-css

@35e0e8c
by Vojta Holikvojtaholik/good-css403 stars
7
Run it yourself

Modern CSS techniques that replace breakpoint ladders, wrapper elements and scripts. Use whenever you write, edit or review styles in any form, including plain CSS, Tailwind classes, StyleX, CSS-in-JS and inline styles, and whenever you build or restyle a page or component, even if the user never mentions CSS.

Recorded with Codex, gpt-6.1-sol, medium effort

Prompt

Build a polished responsive reading-list component for a fictional independent design journal called Margin. Show six article cards with different title lengths, categories, reading times, and CSS-drawn editorial cover art. Include working category filters, a light/dark theme switch, and bookmark toggles with an in-page saved count. Use the modern CSS techniques taught by this Skill to make the same component work in a narrow sidebar and a wide main column. Add a simple width control so visitors can see it adapt. Keep the reading list the main visual focus. Use warm paper, strong editorial typography, and restrained vermilion accents. No invented testimonials or statistics. Save one self-contained index.html with inline CSS and runtime JavaScript. No external assets or dependencies. Use TypeScript for any tooling. The demo runs in an opaque iframe with sandbox allow-scripts only: no storage, form submissions, popups, or downloads. Every control must work by keyboard. Support reduced motion and widths from 390px to 1440px. Do not ask questions.

Desktop screenshot of the page the Agent built for: Build a polished responsive reading-list component for a fictional independent design journal called Margin. Show six ar
Phone screenshot of the page the Agent built for: Build a polished responsive reading-list component for a fictional independent design journal called Margin. Show six ar

Recorded on an older version of this Skill.

Use this Skill: https://skilld.dev/gh/vojtaholik/good-css/good-css

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈80 tokens for metadata: the name and description. ≈1.1k when used: this file. ≈13k more on demand in 8 files.

Description uses 4.0% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈322 characters, or 4.0%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Good CSS

One declaration that adapts on its own beats a set of breakpoints, and a CSS feature beats a script. Use JavaScript only where it makes a result nicer that already works without it.

Each technique is a set of properties and values, so it works in any authoring system. Class names in the examples are placeholders. Write the declarations in what the project already uses, whether that is a stylesheet, Tailwind utilities or StyleX objects. Where that system has no shorthand for a declaration, write it the long way, as a Tailwind arbitrary property or a rule in the project's CSS file. Do not swap the technique for a breakpoint.

In all CSS

These need no file.

  • Write inline and block properties in place of left, right, top and bottom. Tailwind has them too, as in mbs-, pe- and inset-bs-, so never write mt-, pr- or top-. The block ones need Tailwind 4.2. Below it, write them as arbitrary properties, as in [margin-block-start:theme(spacing.4)].
  • Write colors in oklch(), with none as the hue of a gray, white or black. Derive a hover, tint or transparent version with color-mix(in oklch, …).
  • Put sizes that grow with the screen in one clamp() token.
  • Put every :hover rule inside @media (hover: hover) and (pointer: fine).
  • Style focus with :focus-visible and outline. Never write outline: none.
  • Give everything pressable an :active state.
  • Put a transition that moves or scales something inside @media (prefers-reduced-motion: no-preference). Name its properties, never all, and never use ease-in.
  • Cut off overflow with overflow: clip. Keep hidden for an element a script scrolls.

Read the entry before you write

Each file holds entries with the CSS and its rules. The rules are the conditions the CSS needs to work, so keep all of them. Read only the files whose row matches what you are about to write. One component matches two or three, and a whole page matches most of them.

Read Before you write
references/foundations.md a reset or base stylesheet, a set of color tokens, dark mode, a type or spacing scale
references/layout.md a page or section container or any centered max-width wrapper, whether or not anything goes edge to edge, a grid of cards, cards whose parts line up, a sidebar, a component placed in slots of different widths, overlapping layers, centered content that can overflow
references/spacing-and-shape.md spacing between sections, elements stacked one above another, one item pushed to the far end of a row or column, nested rounded corners
references/text-and-media.md text or images that come from a user or a CMS, such as names, titles, excerpts, thumbnails, avatars and embeds, an icon next to a label, a label that looks off-center, numbers in a column
references/interaction.md the focus, hover and press states of a button, link, input or card, a small tap target, a clickable card, form validation, a textarea, a parent styled by what it contains, page scroll locked behind a modal
references/motion.md easing and duration tokens, one state change that drives several values, a shadow that changes on hover, a transition between pages, the indicator under an active tab
references/show-and-hide.md a dialog, popover, dropdown menu or accordion
references/scroll-and-viewport.md a carousel, a row that may overflow, a modal body, chat list or drawer that scrolls between a header and a footer, in-page links under a sticky header, an app shell on desktop or on a phone

Left out on purpose

Never add text-box trim on *, text-rendering: optimizeLegibility, or a reset that puts display: contents or one shared grid cell on every element. references/foundations.md has the reasons.

Browser support

Most entries end with a Support: line. This skill sets no browser floor. Weigh the line against the browsers the project targets, and tell the user when something you used is missing from one of them.

Motion

Whether something should animate, the design or review of motion, springs, gestures and drag, and checks on a real phone belong to Emil Kowalski's skills animate, review-animations, improve-animations, find-animation-opportunities and mobile-native. When they are installed, use them for those jobs, and where one disagrees with a value here, use its value. When they are not, use the entries as written and add no motion beyond what an entry or the task calls for.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    This skill provides modern CSS guidelines and code snippets. It contains stylistic documentation claims regarding testing dates and browser versions in the year 2026, but no security risks or malicious behaviors were identified.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at 35e0e8c. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 20 hours ago.

Activeupdated last month

README badge

README badge for vojtaholik/good-css