CSS, SASS, SCSS, Compass, LESS, and Bourbon: A Quick Comparison
This guide provides a concise overview of CSS3 and several popular CSS preprocessors. For beginners, we strongly recommend starting with Compass!
CSS3:
SASS & SCSS:
SASS Website SCSS Documentation SASS Installation
Example:
/* CSS */ li { font-family: serif; font-weight: bold; font-size: 1.2em; } /* SCSS */ li { font: { family: serif; weight: bold; size: 1.2em; } } /* SASS */ li font: family: serif weight: bold size: 1.2em
Compass:
Compass Website Compass Demo Compass Installation 1 Compass Installation 2
Example:
Compass code:
#opacity-10 { @include opacity(0.1); }
Generated CSS:
/* For IE */ #opacity-10 { filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=10); opacity: 0.1; } /* For other browsers */ #opacity-10 { opacity: 0.1; }
LESS:
LESS Website LESS Demo LESS Documentation LESS vs SASS
Bourbon:
Bourbon Website Bourbon Demo Bourbon Documentation
(Please replace the bracketed link-to...
placeholders with actual URLs.)
The above is the detailed content of What is CSS3, SASS, SCSS, COMPASS, LESS, BOURBON. For more information, please follow other related articles on the PHP Chinese website!