-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Milestone
Description
This task involves writing the full educational content for the entire Best Practices module of the CSS Tutorial.
The goal is to create clear, modern, and practical MDX files that help learners write scalable, maintainable, efficient, and accessible CSS.
Files to Complete
css/best-practices/
│── performance.mdx
│── accessibility.mdx
│── maintainability.mdx
│── scalability.mdx
└── naming-conventions.mdx
What This Module Should Cover
1️⃣ performance.mdx (CSS Performance Optimization)
- How CSS affects rendering performance
- Minimizing reflows/repaints
- Using efficient selectors
- Reducing unused CSS, using Code Splitting
- Tips with
will-change, hardware acceleration - Best practices for animations & transitions
- Practical examples and before/after improvements
2️⃣ accessibility.mdx (CSS for Better UX & A11y)
- Why accessibility matters
- Color contrast & accessible color palettes
- Focus states,
:focus-visible, keyboard navigation - Avoiding "visual-only" content
- Reduced-motion settings →
@media (prefers-reduced-motion) - Meaningful animations (not harmful ones)
- Demo examples with correct A11y patterns
3️⃣ maintainability.mdx (Clean & Friendly Codebase)
- Writing predictable, readable CSS
- Avoiding overly-specific selectors
- Commenting best practices
- Organizing your stylesheet structure
- Avoiding magic numbers
- Using custom properties for consistency
- Example folder structures for real projects
4️⃣ scalability.mdx (Scaling CSS for Large Projects)
- Component-driven CSS
- Making CSS resilient to changes
- Architecture patterns for growth
- Fragmentation vs modularity
- Strategies for large teams
- How to avoid global conflicts
- Real case studies & examples
5️⃣ naming-conventions.mdx (BEM, OOCSS, SMACSS)
- Why naming conventions matter
- BEM block–element–modifier pattern
- OOCSS principles (structure + skin)
- SMACSS categories (base, layout, module, state, theme)
- Pros/cons of each approach
- Example components built using all three
- Guidelines for choosing the right convention
📌 Requirements (Same as Main Issue #78)
- Write clear and easy-to-understand explanations.
- Include working code examples for all key concepts.
- Provide demo files inside a
codefolder. - Suggest diagrams or visual aids where useful.
- Ensure content flows logically across all MDX files.
- Emphasize modern CSS best practices used in real-world development.
📦 Deliverables
- Fully written MDX files for all five topics.
- Demo examples inside:
css/best-practices/topics
📘 Example MDX Header (for contributors to follow)
---
title: "CSS Performance Best Practices"
description: "Learn modern techniques to make your CSS faster, lighter, and more efficient for smooth rendering in web applications."
keywords: [CSS performance, optimization, reflow, repaint, CSS selectors, hardware acceleration]
tags: [performance, optimization, CSS best practices]
sidebar_label: Performance
---
<!-- Content goes here -->Metadata
Metadata
Assignees
Type
Projects
Status
Todo