css
Skill266 starsChanged 10 months agoApache-2.0View on GitHub
Best practices for CSS development including modern layout techniques, naming conventions, theming, and maintainable stylesheet architecture
4 other projects use a version of this.
Adopted by
Most recently taken up by
- minikumachan/claude-session-synctheir own version, first seen Jun 19, 2026
- joabgonzalez/ai-agents-skillstheir own version, first seen Jun 8, 2026
- ffsshhttiikk/opencode-agents-skillstheir own version, first seen Feb 28, 2026
- discourse/skillstheir own version, first seen Dec 29, 2025
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- joabgonzalez/ai-agents-skills★ 9same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- discourse/skills★ 1same name
- minikumachan/claude-session-sync★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository264 other files it gives its agents.
- accessibility-a11ySkill
- alpine-jsSkill
- analytics-data-analysisSkill
- android-developmentSkill
- angular-developmentSkill
- angularSkill
- anime-jsSkill
- anthropic-claude-developmentSkill
- api-developmentSkill
- apollo-graphqlSkill
- aspnet-coreSkill
- astroSkill
- auth0-authenticationSkill
- autogen-developmentSkill
- automl-hyperparameter-optimizationSkill
- aws-developmentSkill
- azureSkill
- backend-developmentSkill
- bash-scriptingSkill
- beautifulsoup-parsingSkill
- bitbucket-workflowSkill
- blazorSkill
- blender-python-addonSkill
- blockchainSkill
- bootstrapSkill
- business-central-developmentSkill
- cheerio-parsingSkill
- chrome-extension-developmentSkill
- ci-cd-best-practicesSkill
- clean-architectureSkill
- clean-codeSkill
- clerk-authenticationSkill
- cloudflare-developmentSkill
- computer-vision-opencvSkill
- convexSkill
- cppSkill
- c-sharpSkill
- cypressSkill
- data-analysis-jupyterSkill
- data-analystSkill
- data-jupyter-pythonSkill
- deep-learning-pythonSkill
- deep-learning-pytorchSkill
- deep-learningSkill
- deno-typescriptSkill
- design-systemsSkill
- devopsSkill
- django-pythonSkill
- django-rest-api-developmentSkill
- dockerSkill
- dotnetSkill
- drizzle-ormSkill
- drupal-developmentSkill
- elasticsearch-best-practicesSkill
- electron-developmentSkill
- elixirSkill
- embedded-stm32Skill
- esbuild-bundlerSkill
- ethereumSkill
- expo-react-native-javascript-best-practicesSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
36 rules. 0 are common, 24 are distinctive, and 12 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
24
Distinctive
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Write semantic HTML to improve accessibility and SEO
- Distinctive: line 11
Use CSS for styling, avoiding inline styles
- Distinctive: line 12
Ensure responsive design using media queries and flexible layouts
- Distinctive: line 18
Use Flexbox for one-dimensional layouts (rows or columns)
- Very specific: line 20
Use flex-wrap for responsive wrapping behavior
- Very specific: line 21
Prefer gap property over margins for consistent spacing
- Distinctive: line 24
Use CSS Grid for two-dimensional layouts
- Very specific: line 26
Use grid-area for named template areas
- Very specific: line 31
Use rem units for typography to respect user preferences
- Very specific: line 32
Use em units for component-relative sizing
- Very specific: line 33
Avoid px for font sizes; reserve for borders and fixed elements
- Very specific: line 35
Use viewport units (vw, vh) thoughtfully for full-screen layouts
- Distinctive: line 40
Use variables for colors, spacing, typography, and shadows
- Distinctive: line 52
Use lowercase with hyphens for class names
- Distinctive: line 53
Avoid IDs for styling; reserve for JavaScript hooks
- Distinctive: line 54
Keep specificity low by using single class selectors
- Distinctive: line 61
Use cascading intentionally, not accidentally
- Very specific: line 62
Consider CSS Layers (@layer) for specificity control
- Distinctive: line 67
Use relative units for flexible layouts
- Distinctive: line 68
Test across multiple viewport sizes
- Distinctive: line 69
Consider container queries for component-level responsiveness
- Distinctive: line 74
Avoid deeply nested selectors
- Distinctive: line 75
Use efficient selectors (class over element)
- Distinctive: line 77
Consider critical CSS for above-the-fold content
- Very specific: line 81
Use aspect-ratio for maintaining proportions
- Very specific: line 83
Use logical properties (margin-inline, padding-block)
- Very specific: line 85
Use @supports for feature detection
- Distinctive: line 90
Keep files modular and focused
- Distinctive: line 91
Document complex styles with comments
- Distinctive: line 92
Use a consistent property order within declarations
- Distinctive: line 96
Use vendor prefixes when necessary (consider Autoprefixer)
- Distinctive: line 97
Test across target browsers
- Distinctive: line 99
Use progressive enhancement approach
- Distinctive: line 103
Ensure sufficient color contrast (WCAG AA minimum)
- Distinctive: line 105
Avoid hiding content in ways that affect screen readers
- Very specific: line 106
Use prefers-reduced-motion media query for animations
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CSS Development Guidelines
Core Principles
- Write semantic HTML to improve accessibility and SEO
- Use CSS for styling, avoiding inline styles
- Ensure responsive design using media queries and flexible layouts
- Prioritize external stylesheets over inline or embedded styles
Layout Techniques
Flexbox
- Use Flexbox for one-dimensional layouts (rows or columns)
- Leverage
justify-contentandalign-itemsfor alignment - Use
flex-wrapfor responsive wrapping behavior - Prefer
gapproperty over margins for consistent spacing
Grid
- Use CSS Grid for two-dimensional layouts
- Define grid templates with
grid-template-columnsandgrid-template-rows - Use
grid-areafor named template areas - Leverage
auto-fitandauto-fillfor responsive grids
Units and Typography
- Use
remunits for typography to respect user preferences - Use
emunits for component-relative sizing - Avoid
pxfor font sizes; reserve for borders and fixed elements - Implement fluid typography with
clamp()when appropriate - Use viewport units (
vw,vh) thoughtfully for full-screen layouts
CSS Variables (Custom Properties)
- Define design tokens as CSS variables on
:root - Use variables for colors, spacing, typography, and shadows
- Implement theming by overriding variables in different contexts
- Name variables semantically (e.g.,
--color-primary,--spacing-md)
Naming Conventions
BEM Methodology
- Block: Standalone component (e.g.,
.card) - Element: Part of a block (e.g.,
.card__title) - Modifier: Variation of block or element (e.g.,
.card--featured)
Best Practices
- Use lowercase with hyphens for class names
- Avoid IDs for styling; reserve for JavaScript hooks
- Keep specificity low by using single class selectors
- Scope styles to components to prevent conflicts
Specificity Management
- Maintain specificity at 0-1-0 (single class) when possible
- Avoid
!importantdeclarations - Use cascading intentionally, not accidentally
- Consider CSS Layers (
@layer) for specificity control
Responsive Design
- Implement mobile-first media queries
- Use relative units for flexible layouts
- Test across multiple viewport sizes
- Consider container queries for component-level responsiveness
Performance
- Minimize selector complexity
- Avoid deeply nested selectors
- Use efficient selectors (class over element)
- Leverage CSS containment for isolated components
- Consider critical CSS for above-the-fold content
Modern CSS Features
- Use
aspect-ratiofor maintaining proportions - Leverage
gapin Flexbox and Grid - Use logical properties (
margin-inline,padding-block) - Implement smooth transitions with
transitionproperty - Use
@supportsfor feature detection
Organization
- Structure stylesheets logically (base, layout, components, utilities)
- Keep files modular and focused
- Document complex styles with comments
- Use a consistent property order within declarations
Browser Compatibility
- Use vendor prefixes when necessary (consider Autoprefixer)
- Test across target browsers
- Provide fallbacks for newer features
- Use progressive enhancement approach
Accessibility
- Ensure sufficient color contrast (WCAG AA minimum)
- Provide visible focus styles for keyboard navigation
- Avoid hiding content in ways that affect screen readers
- Use
prefers-reduced-motionmedia query for animations
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

