css-styling-pixel-perfect

A guide to organising CSS, the language that controls how web pages look. It covers approaches such as BEM naming, Tailwind utility classes, CSS-in-JS, and CSS Modules for styling components.

In plain words
What is it for?
Use it when designing CSS architecture, configuring Tailwind, styling components, using CSS-in-JS or CSS Modules, building responsive layouts, and improving styling performance.
Why use it?
It helps prevent stylesheets from becoming difficult to maintain, inconsistent, or prone to conflicting rules. It also supports choosing a styling approach that fits the project.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/plugin87/full-stack-design-skills/css-styling-pixel-perfect
Any agent
npx skills add plugin87/full-stack-design-skills --skill css-styling-pixel-perfect
Clone the repo
git clone --depth 1 https://github.com/plugin87/full-stack-design-skills

Made for: Claude Code, Codex.

Per session 126 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,828 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00126 $0.02828
Opus 5 $0.00063 $0.01414
Sonnet 5 $0.00025 $0.00566
Haiku 4.5 $0.00013 $0.00283

Measured 2d ago against content hash ecf4a495dce6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

css-styling-pixel-perfect scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/css-styling-pixel-perfect/SKILL.md · 544 lines

How it starts

The opening of the file, as written. The whole thing — 544 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CSS Styling & Pixel-Perfect Design

Practical CSS patterns and strategies for building scalable, maintainable, and performant stylesheets.

CSS is often overlooked, but architectural decisions made early determine scalability, maintainability, and performance. Understanding CSS architecture, choosing the right approach (BEM vs Tailwind vs CSS-in-JS), and applying best practices is essential for professional development.


Core Principle: Choose an Architecture

CSS Architecture Options

Traditional CSS (BEM, OOCSS):

  • Classes and naming conventions
  • Organized by specificity
  • Pros: Simple, works everywhere
  • Cons: Class naming is hard, specificity conflicts

Utility-First (Tailwind):

  • Predefined utility classes
  • Build custom designs from utilities
  • Pros: Fast development, consistent spacing/colors
  • Cons: HTML feels cluttered, learning curve

CSS-in-JS (styled-components, emotion):

  • Write CSS in JavaScript
  • Scoped to component
  • Pros: No naming conflicts, dynamic styles
  • Cons: Runtime cost, harder to debug

CSS Modules:

  • Local-scoped CSS
  • Imports into components
  • Pros: No naming conflicts, traditional CSS
  • Cons: Extra build step, less reusable

Architecture Pattern 1: BEM (Block Element Modifier)

Naming convention: .block__element--modifier

/* Block: main component */
.button { ... }

/* Element: part of block */
.button__text { ... }

/* Modifier: state or variation */
.button--primary { ... }
.button--disabled { ... }

/* Usage */
.button--primary.button--large { ... }

HTML:

<button class="button button--primary">
  <span class="button__text">Click me</span>
</button>

Pros:

  • Clear structure
  • No cascading issues
  • Reusable across projects

Cons:

  • Verbose class names
  • Takes discipline to maintain

Architecture Pattern 2: Tailwind CSS (Utility-First)

Apply utility classes to build components:

<!-- Direct in HTML -->
<button class="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 focus:outline-none focus:ring-2">
  Click me
</button>

<!-- Or extract to component -->
<button class="btn btn-primary">Click me</button>

Read the full file on GitHub · 544 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 544 lines · 0 tokens per session scan A ecf4a495dce6

Subscribe to this mod's changes

css-styling-pixel-perfect is a skill published in the GitHub repository plugin87/full-stack-design-skills (10 stars, last pushed 1mo ago), licensed MIT. It adds 126 tokens to every session and 2,828 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

design-guide

Paperclip UI design system guide for building consistent, reusable frontend components. Use when creating new UI components, modifying existing ones, adding pages or features to the frontend, styling UI elements, or when you need to understand the design language and conventions. Covers: component creation, design…

paperclipai/paperclip · 105 tokens

Shade ShadCN install

Guardrails for running pnpm dlx shadcn@latest add in Shade — never overwrite existing components, fresh branch first, swap raw colours for semantic tokens after integrating. Trigger when the user proposes a shadcn add, or when a fresh ShadCN-shaped file lands in apps/shade/src/components/ui.

TryGhost/Ghost · 72 tokens

chakra-ui-builder

Build responsive, accessible UI components and layouts using Chakra UI v3, install or configure Chakra UI in new and existing projects, and design scalable themes using tokens, semantic tokens, recipes, and slot recipes. Use this skill whenever a user asks to build, create, or generate any UI component, page, form…

chakra-ui/chakra-ui · 214 tokens

material-ui-tailwind

Integrates Material UI with Tailwind CSS v4 using cascade layers (enableCssLayer, @layer order) and documents Tailwind v3 interoperability (preflight, important, injectFirst, portals). Use when combining MUI with Tailwind utilities, slotProps className, or theme token bridges.

mui/material-ui · 67 tokens

author-component

Create or review Blazor components (.razor files) with correct architecture. USE FOR: writing new Blazor components that do NOT involve JavaScript interop, implementing parameters and EventCallback, RenderFragment slots, component lifecycle (OnInitializedAsync, OnParametersSet), async patterns, IAsyncDisposable…

dotnet/skills · 148 tokens

obsidian-layout-adjustment

Workflow for working with the user on changing how Obsidian looks using CSS snippets. Use this whenever the user asks to restyle Obsidian, tune a vault's visual layout, adjust tabs, sidebars, note surfaces, properties, backlinks, graph panes, file explorer rows, icons, links, shadows, active states, or CSS snippets.…

Ar9av/obsidian-wiki · 115 tokens