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!