css▌
mindrally/skills · updated Apr 29, 2026
css
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
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.7★★★★★42 reviews- ★★★★★Chaitanya Patil· Dec 24, 2024
css fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Noah Khan· Dec 12, 2024
css is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Mei Flores· Dec 4, 2024
css reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Olivia Abbas· Nov 23, 2024
I recommend css for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Piyush G· Nov 15, 2024
css is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Mei Torres· Nov 3, 2024
css fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Isabella Johnson· Oct 22, 2024
We added css from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Dev Taylor· Oct 14, 2024
Useful defaults in css — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Shikha Mishra· Oct 6, 2024
Keeps context tight: css is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Aanya Bansal· Sep 25, 2024
css fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
showing 1-10 of 42