A comprehensive collection of PostCSS concepts, plugins, workflows, and practical examples for modern CSS development.
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
- Start with
0.Setup-PostCSS-Config/- Basic configuration - Read
POSTCSS-PLUGINS-GUIDE.md- Understand available plugins - Explore
1.PostCSS-Plugins-Based-Concepts/- See plugins in action
- Study
POSTCSS-WORKFLOWS.md- Learn best practices - Check
2.PostCSS-With-Gulp-Concepts/- Build automation - Review
3.PostCSS-With-Gulp-And-Sass/- Advanced workflows
- Master
POSTCSS-RUNNERS-SETUP.md- Different runner setups - Explore authentication portal in
1.PostCSS-Plugins-Based-Concepts/ - Study layout systems and component architecture
- 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- 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 portalsrc/layout-demo.html- Layout system demonstrationsrc/styles.css- Main styles with partial importssrc/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- 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 featuressrc/assets/css/styles.css- Source CSS filesgulpfile.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- 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 HTMLgulpfile.js- Advanced build configurationdist/- 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✅ 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
✅ 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
✅ PostCSS CLI - Direct processing
✅ Gulp - Task automation
✅ File Watching - Development workflows
✅ Source Maps - Debugging support
✅ Error Handling - Build optimization
- Complete plugin reference
- Use case examples
- Plugin combinations
- Performance considerations
- CLI vs Gulp vs Webpack vs Vite
- Migration examples
- Performance comparison
- Setup instructions
- Development workflows
- Production optimization
- Best practices
- Troubleshooting guide
- Node.js (v14 or higher)
- npm or yarn
- Basic CSS knowledge
- Terminal/Command Line familiarity
- How PostCSS transforms CSS
- Plugin-based architecture
- Configuration management
- Build process integration
- Setting up PostCSS configurations
- Working with different plugins
- Creating responsive layouts
- Building component libraries
- Custom CSS syntax
- Performance optimization
- Build automation
- Cross-browser compatibility
git clone https://github.com/JaberKh16/PostCSS-Learning-Materials.git
cd PostCSS-Learning-Materials- Beginner: Start with
0.Setup-PostCSS-Config/ - Intermediate: Try
1.PostCSS-Plugins-Based-Concepts/ - Advanced: Explore
2.PostCSS-With-Gulp-Concepts/
- Read the plugin guide first
- Study the runner setups
- Practice the workflows
- Start with simple configurations
- Gradually add plugins
- Experiment with different runners
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
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
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!