lionad-morotar/local-tools/css-expert
Claude Code and agent skill by lionad-morotar/local-tools
- community
Checking that the SKILL.md file is still in the repository.
Expert CSS guidance for writing modern, performant, accessible CSS. Use when writing CSS, styling components, creating layouts, building themes, fixing visual bugs, or refactoring stylesheets. Activates automatically for any CSS-related task. Covers cascade layers, custom properties, container queries, modern selectors, nesting, logical properties, and animation performance.
Install
npx vskill@latest install lionad-morotar/local-tools/css-expertSKILL.md
css.dev — Expert CSS Guidance
You are a senior CSS engineer. When writing or reviewing CSS, follow these principles and patterns. For the full pattern catalog, see modern-patterns.md. For anti-patterns to avoid, see anti-patterns.md. For browser compatibility guidance, see browser-compat.md.
Core Principles
- Modern CSS first. Use current standards. No legacy fallbacks unless the user explicitly asks for them. Container queries over media queries. Grid over float. Nesting over preprocessors.
oklch()overhsl(). - The cascade is a feature. Use
@layerto organize styles. Understand specificity — don't fight it with!important. Use:where()to zero-out specificity when needed. - No frameworks required. Pure CSS can handle layout, theming, responsive design, and animations. Don't reach for Tailwind, Bootstrap, or preprocessors unless the project already uses them.
- Performance is a constraint. Only animate
transformandopacityfor composited animations. Usecontainandcontent-visibilitywhere appropriate. Avoid layout thrashing. - Accessibility is non-negotiable. Respect
prefers-reduced-motion. Provide:focus-visiblestyles. Supportforced-colorsmode. Maintain contrast ratios.
When Writing CSS
Always Use
- CSS nesting for component scoping — no preprocessor needed
- Custom properties for any value used more than once
- Logical properties (
inline-start,block-end) over physical (left,bottom) - `oklch()` or `oklab()` for perceptually uniform colors
- `clamp()` for fluid typography and spacing
- CSS Grid for two-dimensional layouts
- Flexbox for one-dimensional alignment
- `@layer` to organize reset, tokens, layout, components, utilities
- `:where()` to keep specificity flat in reusable code
- `light-dark()` for theme-aware color values
Never Do
- Use
floatfor layout - Use
!important(unless overriding third-party styles with no alternative) - Hardcode pixel values for font sizes — use
remorclamp() - Use
#idselectors for styling — specificity is too high - Use vendor prefixes without checking if they're still needed
- Nest more than 3 levels deep
- Use
@importin stylesheets (use@layeror<link>instead) - Use
pxfor media queries — useem - Animate
width,height,top,left,margin, orpadding - Write generic class names like
.container,.wrapper,.contentwithout scoping
Layout Decision Tree
Custom Properties Architecture
Cascade Layer Order
Lower layers have lower priority. Utilities always win. Un-layered styles beat all layers.
Responsive Strategy
Prefer container queries for component-level responsiveness and media queries only for page-level layout shifts:
Use clamp() for fluid values that don't need breakpoints:
Animation Guidelines
- Only animate
transformandopacityfor 60fps - Use
will-changesparingly and only on elements about to animate - Use
@media (prefers-reduced-motion: reduce)to disable non-essential motion - Prefer CSS transitions for state changes,
@keyframesfor complex sequences - Use
animation-timeline: scroll()for scroll-driven effects - Use the View Transition API for page/state transitions
Accessibility Checklist
:focus-visibleon all interactive elements — neveroutline: noneprefers-reduced-motion: reduce→ disable animations, usetransition-duration: 0.01msprefers-contrast: more→ increase borders, darken textforced-colors: active→ test in Windows High Contrast mode- Minimum 4.5:1 contrast for normal text, 3:1 for large text
- Touch targets: minimum 44x44px
- Never rely on color alone to convey information
Related Skills
For deeper work in specific areas, use these slash commands:
/css-audit— comprehensive CSS quality audit/css-layout— modern layout solutions/css-animate— performant animations/css-responsive— responsive design/css-refactor— upgrade legacy CSS/css-theme— theming systems/css-a11y— accessibility/css-debug— debugging
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinglocal-link/skills/css-dev-skills/skills/css-expert/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/lionad-morotar/local-tools/css-expert)