10up-css
CSS architecture, best practices, and patterns for WordPress projects. Covers ITCSS methodology, accessibility, specificity management, naming conventions, and modern CSS features.
About this skill
The '10up-css' skill offers a structured approach to writing, reviewing, and architecting CSS for WordPress themes and plugins. It encapsulates 10up's established standards, which emphasize principles like ITCSS (Inverted Triangle CSS) for scalable architecture, meticulous specificity management, clear naming conventions, and adherence to modern CSS features and accessibility guidelines. This skill acts as an intelligent style guide, enabling an AI agent to apply expert-level CSS knowledge. Key use cases include generating new CSS code that is inherently robust and maintainable, conducting thorough reviews of existing stylesheets to identify areas for improvement against best practices, and establishing a solid CSS architecture from the ground up for new projects. It's particularly useful for troubleshooting common styling issues or ensuring that all visual elements meet stringent accessibility compliance requirements. By leveraging this skill, developers and teams can ensure their WordPress CSS codebases are consistent, highly maintainable, performant, and future-proof. It removes the guesswork from applying complex architectural patterns and guarantees adherence to high-quality coding standards, leading to more efficient development cycles and better end-user experiences.
Best use case
This skill is primarily for AI agents assisting in the development, review, and maintenance of CSS within WordPress themes and plugins. It benefits developers and teams aiming to enforce high-quality, scalable, and accessible CSS standards without manually recalling every guideline. Its core use is to ensure all generated or reviewed CSS aligns with 10up's industry-recognized best practices.
CSS architecture, best practices, and patterns for WordPress projects. Covers ITCSS methodology, accessibility, specificity management, naming conventions, and modern CSS features.
CSS code that strictly adheres to 10up's best practices for maintainability, scalability, accessibility, and modern web standards within WordPress projects, or a detailed analysis of existing CSS against these standards.
Practical example
Example input
Review the `style.css` file in the current project directory for 10up CSS best practices, focusing on mobile-first design, specificity, and accessibility guidelines, and suggest improvements.
Example output
Analysis of `style.css` based on 10up CSS best practices: - **Specificity:** The selector `.main-header > nav > ul > li > a` on line 125 has high specificity; consider simplifying or using a BEM-like approach for better maintainability. - **Mobile-First:** Ensure that primary layouts are designed mobile-first. For example, consider replacing media queries for column layouts with CSS Grid's `auto-fit` and `minmax()` for inherent responsiveness. - **Accessibility:** Verify sufficient color contrast for the call-to-action buttons defined on line 180 to meet WCAG AA standards.
When to use this skill
- Writing new CSS for WordPress themes or plugins
- Reviewing existing CSS code for best practices and compliance
- Setting up the CSS architecture for a new WordPress project
- Ensuring accessibility compliance and modern web standards in styles
When not to use this skill
- When working on non-WordPress related projects
- If an entirely different CSS methodology or style guide is explicitly required
- For projects where CSS styling is minimal and strict architectural adherence is not critical
- When the primary focus is on backend development or JavaScript frameworks unrelated to styling
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/10up-css/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How 10up-css Compares
| Feature / Agent | 10up-css | Standard Approach |
|---|---|---|
| Platform Support | Claude | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | easy | N/A |
Frequently Asked Questions
What does this skill do?
CSS architecture, best practices, and patterns for WordPress projects. Covers ITCSS methodology, accessibility, specificity management, naming conventions, and modern CSS features.
Which AI agents support this skill?
This skill is designed for Claude.
How difficult is it to install?
The installation complexity is rated as easy. You can find the installation instructions above.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# 10up CSS Best Practices
This skill provides comprehensive CSS authoring guidelines following 10up standards for WordPress development.
## When to Use
- Writing new CSS for themes or plugins
- Reviewing CSS code for best practices
- Setting up CSS architecture for a project
- Troubleshooting specificity or styling issues
- Ensuring accessibility compliance in styles
- Organizing stylesheets with ITCSS methodology
## Core Principles
### Follow Established Systems First
Assume existing conventions exist for valid reasons. Learn the codebase before suggesting changes. Only propose modifications when current systems create genuine problems—inconsistency, scaling issues, or errors.
### Document Custom Architectures
When designing new CSS systems, capture folder layout, naming conventions, tooling decisions, and rationales. Store documentation in `/decisions/` directories within repositories.
### Content-Agnostic Component Design
Build components assuming no control over content. Test against extreme scenarios:
- Navigation with 20+ items instead of 5
- Missing images in image-based cards
- Multi-line titles designed for single lines
- Exceptionally long or empty excerpts
## Mobile-First Approach
Prioritize mobile layouts in implementation. Style projects as if desktop doesn't exist initially.
**Implementation strategy:**
1. Use modern CSS features (Grid `auto-fit`, `clamp()`) to create inherently responsive layouts
2. Reach for media queries last as fallbacks rather than primary tools
3. Prefer `scrolling` over carousels or dropdowns when appropriate
**Watch for:**
- Different image aspect ratios across breakpoints
- Reordered elements requiring CSS Grid/Flexbox with accessibility implications
- Markup differences between mobile/desktop views
## CSS Foundations
Set `box-sizing: border-box` globally at project start:
```css
*,
*::before,
*::after {
box-sizing: border-box;
}
:where(body) {
margin: 0;
}
```
Establish foundational styles using `:where()` for zero specificity. Avoid opinionated defaults like `text-align: center` that require constant overrides.
## Specificity Management
**Target range:** `0,1,0` to `0,2,1` maximum.
**Rules:**
- Avoid combining tag selectors with classes (`a.button` → `.button`)
- Use `:where()` for bare element styles
- Limit nesting to 2 levels; 3 only when necessary
- Avoid IDs for styling (use attribute selectors like `[id="drawer"]` if needed)
- Reserve `!important` for exceptional cases only
```css
/* Use :where() for zero specificity on base elements */
:where(h1, h2, h3, h4, h5, h6) {
margin-block: 0;
}
/* Nesting pseudo-classes for state is acceptable */
.button {
&:hover {
/* styles here */
}
}
/* Keep child selectors flat, not nested */
.button__icon {
/* styles here */
}
```
## Writing Minimal CSS
Use logical properties instead of broad shorthands:
```css
/* Do this */
.element {
margin-inline: auto;
background-color: var(--color-primary);
}
/* Avoid */
.element {
margin: 0 auto; /* Sets unintended values */
background: var(--color-primary); /* Resets other background properties */
}
```
Target elements precisely. Instead of global selectors affecting all elements:
```css
/* Avoid broad selectors */
a { color: blue; }
/* Use scoped selectors */
.entry-content :is(h1, h2, h3, p, li) > a {
color: var(--color-link);
}
```
## Component Margin Strategy
**Never add margins to reusable components.** Margins lock components into specific contexts.
```css
/* Avoid */
.card {
margin-block: 1.5rem;
}
/* Do this - manage spacing at container level */
.card-grid {
display: grid;
row-gap: 1.5rem;
}
```
**Apply margins in one direction only** (preferably upward):
```css
.component > * + * {
margin-top: 1.5em;
}
```
## Responsive Design Without Media Queries
Prioritize intrinsic solutions:
```css
/* Use clamp() for fluid values */
.heading {
font-size: clamp(1.5rem, 4vw, 3rem);
}
/* Use CSS Grid for flexible layouts */
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
gap: 1.5rem;
}
```
Use `rem`, `em`, `%` over fixed pixels. Media queries should be fallbacks for cases where intrinsic solutions won't work.
## Modern CSS Feature Adoption
### Adoption Process
1. **Check compatibility** via Can I Use or Google Baseline
2. **Provide fallbacks** with supported declaration first:
```css
.element {
height: 100vh; /* widely supported */
height: 100dvh; /* newer unit */
}
```
3. **Use `@supports`** for feature detection:
```css
.site {
min-height: 100dvh;
}
@supports not (min-height: 100dvh) {
.site {
min-height: 100vh;
}
}
```
4. **Consider polyfills cautiously**—they add dependencies and bundle size
## Quick Reference
| Topic | Guideline |
|-------|-----------|
| Specificity | Keep between `0,1,0` and `0,2,1` |
| Nesting | Maximum 2 levels, 3 for exceptional cases |
| Component margins | None—use container `gap` |
| Margin direction | One direction only (prefer top) |
| IDs for styling | Avoid—use `[id="name"]` if needed |
| `!important` | Exceptional cases only |
| Media queries | Last resort after intrinsic solutions |
## References
- [ITCSS Architecture](references/itcss-architecture.md) - Layer organization and file structure
- [Accessibility](references/accessibility.md) - CSS accessibility requirements
- [Naming Conventions](references/naming-conventions.md) - Classes, IDs, custom properties, animations
## External Resources
- [Specificity Calculator](https://specificity.keegan.st)
- [Defensive CSS](https://defensivecss.dev)
- [MDN Logical Properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values)
- [RTL Styling 101](https://rtlstyling.com)
## Verification
After writing CSS:
1. Validate specificity stays within `0,1,0` to `0,2,1` range
2. Test at 400% zoom for reflow compliance
3. Verify focus states are visible with keyboard navigation
4. Check RTL support with `dir="rtl"` on container
5. Test responsive behavior without relying solely on media queries
## Failure Modes
**Styles not applying:**
- Check specificity conflicts
- Verify CSS custom property fallbacks
- Confirm correct selector scope
**Layout breaking at certain widths:**
- Review content-agnostic design principles
- Check for fixed widths instead of relative units
- Verify `clamp()` or Grid intrinsic sizing
**Accessibility issues:**
- Missing focus states
- Insufficient color contrast
- Content inaccessible at zoom levels
## Escalation
Ask the user when:
- Complex animation requirements
- Cross-browser compatibility issues
- Performance optimization for large stylesheets
- Integration with third-party CSS frameworksRelated Skills
laravel-expert
Senior Laravel Engineer role for production-grade, maintainable, and idiomatic Laravel solutions. Focuses on clean architecture, security, performance, and modern standards (Laravel 10/11+).
webmcp
This skill guides AI agents in implementing WebMCP within web projects, enabling browser-native structured tools for AI interaction using JavaScript or HTML APIs.
Prompt Coach
Analyze your Claude Code session logs to improve prompt quality, optimize tool usage, and enhance your skills as an AI-native engineer.
nextjs
Provides comprehensive Next.js routing capabilities, including typed routes, helpers for `PageProps` and `LayoutProps`, and `nuqs` for managing URL state.
react
This AI agent skill guides the generation of modern React components, incorporating best practices such as destructured props, leveraging compiler optimizations, and proper use of React Effects. It also ensures compatibility and utilizes Tailwind CSS v4 syntax.
just
Use `just` to save and run project-specific commands. Use when the user mentions `justfile`, `recipe`, or needs a simple alternative to `make` for task automation.
chrome-debug
This skill empowers AI agents to debug web applications and inspect browser behavior using the Chrome DevTools Protocol (CDP), offering both collaborative (headful) and automated (headless) modes.
worktree-manager
Create, manage, and cleanup git worktrees with Claude Code agents across all projects. USE THIS SKILL when user says "create worktree", "spin up worktrees", "new worktree for X", "worktree status", "cleanup worktrees", "sync worktrees", or wants parallel development branches. Also use when creating PRs from a worktree branch (to update registry with PR number). Handles worktree creation, dependency installation, validation, agent launching in Ghostty, and global registry management.
clearshot
Structured screenshot analysis for UI implementation and critique. Analyzes every UI screenshot with a 5×5 spatial grid, full element inventory, and design system extraction — facts and taste together, every time. Escalates to full implementation blueprint when building. Trigger on any digital interface image file (png, jpg, gif, webp — websites, apps, dashboards, mockups, wireframes) or commands like 'analyse this screenshot,' 'rebuild this,' 'match this design,' 'clone this.' Skip for non-UI images (photos, memes, charts) unless the user explicitly wants to build a UI from them. Does NOT trigger on HTML source code, CSS, SVGs, or any code pasted as text.
osgrep
Semantic code search using natural language queries. Use when users ask "where is X implemented", "how does Y work", "find the logic for Z", or need to locate code by concept rather than exact text. Returns file paths with line numbers and code snippets.
agentifind
This skill sets up codebase intelligence for AI agents by running the `agentifind` CLI to extract code structure and synthesize a `CODEBASE.md` navigation guide. It includes staleness detection and intelligently handles LSP installation for optimal accuracy.
CLAUDE.md – JJ Quick Command List
A concise cheat sheet for essential Jujutsu (`jj`) version control commands, designed to help AI agents or users quickly perform common repository operations.