Skip to content

JaberKh16/PostCSS-Learning-Materials

Repository files navigation

🧩 PostCSS Learning Materials

A comprehensive collection of PostCSS concepts, plugins, workflows, and practical examples for modern CSS development.


πŸ“š Project Structure

PostCSS-Learning-Materials/
β”œβ”€β”€ πŸ“– README.md                           # This file - Main navigation guide
β”œβ”€β”€ πŸ“‹ POSTCSS-PLUGINS-GUIDE.md           # Complete plugins reference
β”œβ”€β”€ πŸƒβ€β™‚οΈ POSTCSS-RUNNERS-SETUP.md          # Runner configurations & comparisons
β”œβ”€β”€ πŸ”„ POSTCSS-WORKFLOWS.md                # Best practices & workflows
β”œβ”€β”€ πŸ“ 0.Setup-PostCSS-Config/             # Basic PostCSS  setup
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   └── styles.css
β”‚   β”œβ”€β”€ dist/
β”‚   β”‚   └── styles.css
β”‚   β”œβ”€β”€ postcss.config.js
β”‚   └── package.json
β”œβ”€β”€ πŸ“ 1.PostCSS-Plugins-Based-Concepts/   # Plugin demonstrations
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ index.html                    # Authentication portal
β”‚   β”‚   β”œβ”€β”€ layout-demo.html               # Layout system demo
β”‚   β”‚   β”œβ”€β”€ styles.css                  # Main styles with partials
β”‚   β”‚   └── assets/css/
β”‚   β”‚       β”œβ”€β”€ utilities/
β”‚   β”‚       β”‚   β”œβ”€β”€ custom-selector.css
β”‚   β”‚       β”‚   └── variables.css
β”‚   β”‚       └── partials/
β”‚   β”‚           β”œβ”€β”€ _variables.css
β”‚   β”‚           β”œβ”€β”€ _navigation.css
β”‚   β”‚           β”œβ”€β”€ _auth-layout.css
β”‚   β”‚           β”œβ”€β”€ _forms.css
β”‚   β”‚           └── _basic-layout.css
β”‚   β”œβ”€β”€ dist/styles.css
β”‚   β”œβ”€β”€ postcss.config.js
β”‚   └── package.json
β”œβ”€β”€ πŸ“ 2.PostCSS-With-Gulp-Concepts/       # Gulp integration
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ index.html                    # Layout demo page
β”‚   β”‚   └── assets/
β”‚   β”‚       β”œβ”€β”€ css/
β”‚   β”‚       β”‚   └── styles.css
β”‚   β”‚       └── js/
β”‚   β”œβ”€β”€ dist/css/styles.css
β”‚   β”œβ”€β”€ gulpfile.js
β”‚   └── package.json
β”œβ”€β”€ πŸ“ 3.PostCSS-With-Gulp-And-Sass/       # Gulp + Sass workflow
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ index.html
β”‚   β”‚   β”œβ”€β”€ scss/
β”‚   β”‚   └── css/
β”‚   β”œβ”€β”€ dist/
β”‚   β”œβ”€β”€ gulpfile.js
β”‚   └── package.json
└── πŸ“ PostCSS-Concepts-Materials          # Additional resources
    └── PostCSS-Concepts-Materials

πŸš€ Quick Start

For Beginners

  1. Start with 0.Setup-PostCSS-Config/ - Basic configuration
  2. Read POSTCSS-PLUGINS-GUIDE.md - Understand available plugins
  3. Explore 1.PostCSS-Plugins-Based-Concepts/ - See plugins in action

For Intermediate Users

  1. Study POSTCSS-WORKFLOWS.md - Learn best practices
  2. Check 2.PostCSS-With-Gulp-Concepts/ - Build automation
  3. Review 3.PostCSS-With-Gulp-And-Sass/ - Advanced workflows

For Advanced Users

  1. Master POSTCSS-RUNNERS-SETUP.md - Different runner setups
  2. Explore authentication portal in 1.PostCSS-Plugins-Based-Concepts/
  3. Study layout systems and component architecture

πŸ“‹ Available Projects

0. Setup PostCSS Config 🟒

  • Purpose: Basic PostCSS setup and configuration
  • Features: Simple plugin configuration
  • Runner: PostCSS CLI
  • Learning: Configuration basics
cd 0.Setup-PostCSS-Config
npm install
npm run build:css

1. PostCSS Plugins Based Concepts 🟑

  • Purpose: Demonstrate various PostCSS plugins
  • Features: Authentication portal, navigation, forms, layouts
  • Runner: PostCSS CLI
  • Learning: Plugin combinations, custom selectors, variables
  • Key Files:
    • src/index.html - Complete authentication portal
    • src/layout-demo.html - Layout system demonstration
    • src/styles.css - Main styles with partial imports
    • src/assets/css/partials/ - Modular CSS components
cd 1.PostCSS-Plugins-Based-Concepts
npm install
npm run build:css
# Open index.html for authentication demo
# Open layout-demo.html for layout system

2. PostCSS With Gulp Concepts πŸ”΅

  • Purpose: Gulp integration for task automation
  • Features: Automated builds, file watching, source maps
  • Runner: Gulp
  • Learning: Task automation, build processes
  • Key Files:
    • src/index.html - Layout demo with PostCSS features
    • src/assets/css/styles.css - Source CSS files
    • gulpfile.js - Build automation configuration
cd 2.PostCSS-With-Gulp-Concepts
npm install
npm run gulp:build    # Build once
npm run gulp:watch    # Watch for changes
# Open src/index.html to see results

3. PostCSS With Gulp And Sass 🟣

  • Purpose: Advanced workflow with Sass preprocessing
  • Features: Sass + PostCSS pipeline, complex builds
  • Runner: Gulp + Sass
  • Learning: Preprocessor integration, complex pipelines
  • Key Files:
    • src/ - Source files with Sass and HTML
    • gulpfile.js - Advanced build configuration
    • dist/ - Compiled output
cd 3.PostCSS-With-Gulp-And-Sass
npm install
npm run gulp:build    # Build with Sass preprocessing
npm run gulp:watch    # Watch Sass and CSS changes

🎯 Key Features Demonstrated

PostCSS Plugins

βœ… autoprefixer - Vendor prefixing
βœ… postcss-preset-env - Future CSS features
βœ… postcss-simple-vars - Sass-like variables
βœ… postcss-nested - Nested CSS syntax
βœ… postcss-import - CSS imports
βœ… cssnano - CSS minification
βœ… postcss-custom-media - Custom media queries
βœ… postcss-custom-selectors - Custom selectors

Advanced Concepts

βœ… Custom Selectors - :--heading syntax
βœ… Custom Media Queries - @media --small-viewport
βœ… Component Architecture - Modular CSS partials
βœ… Responsive Design - Mobile-first approach
βœ… Authentication Forms - Complete UI components
βœ… Layout Systems - Grid and flexbox utilities

Build Systems

βœ… PostCSS CLI - Direct processing
βœ… Gulp - Task automation
βœ… File Watching - Development workflows
βœ… Source Maps - Debugging support
βœ… Error Handling - Build optimization


πŸ“– Documentation Guide

πŸ“‹ POSTCSS-PLUGINS-GUIDE.md

  • Complete plugin reference
  • Use case examples
  • Plugin combinations
  • Performance considerations

πŸƒβ€β™‚οΈ POSTCSS-RUNNERS-SETUP.md

  • CLI vs Gulp vs Webpack vs Vite
  • Migration examples
  • Performance comparison
  • Setup instructions

πŸ”„ POSTCSS-WORKFLOWS.md

  • Development workflows
  • Production optimization
  • Best practices
  • Troubleshooting guide

πŸ› οΈ Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • Basic CSS knowledge
  • Terminal/Command Line familiarity

🎨 What You'll Learn

Fundamental Concepts

  • How PostCSS transforms CSS
  • Plugin-based architecture
  • Configuration management
  • Build process integration

Practical Skills

  • Setting up PostCSS configurations
  • Working with different plugins
  • Creating responsive layouts
  • Building component libraries

Advanced Techniques

  • Custom CSS syntax
  • Performance optimization
  • Build automation
  • Cross-browser compatibility

πŸš€ Getting Started

1. Clone and Install

git clone https://github.com/JaberKh16/PostCSS-Learning-Materials.git
cd PostCSS-Learning-Materials

2. Choose Your Path

  • Beginner: Start with 0.Setup-PostCSS-Config/
  • Intermediate: Try 1.PostCSS-Plugins-Based-Concepts/
  • Advanced: Explore 2.PostCSS-With-Gulp-Concepts/

3. Follow the Documentation

  • Read the plugin guide first
  • Study the runner setups
  • Practice the workflows

4. Build Your Own

  • Start with simple configurations
  • Gradually add plugins
  • Experiment with different runners

🎯 Learning Outcomes

After completing these materials, you'll be able to:

βœ… Configure PostCSS for any project
βœ… Select appropriate plugins for your needs
βœ… Set up build automation with Gulp or other runners
βœ… Create responsive layouts with modern CSS
βœ… Optimize CSS for production
βœ… Troubleshoot common issues
βœ… Integrate PostCSS into existing workflows


🀝 Contributing

This is a learning repository. Feel free to:

  • Report issues or suggest improvements
  • Add new plugin examples
  • Share your own PostCSS workflows
  • Help others learn

πŸ“„ License

This project is open source and available under the MIT License.


Happy Learning! πŸŽ‰

Start with the basics, practice the examples, and build your own PostCSS-powered projects!

About

basic learning on postcss

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors