Home > Web Front-end > JS Tutorial > What is CSS3, SASS, SCSS, COMPASS, LESS, BOURBON

What is CSS3, SASS, SCSS, COMPASS, LESS, BOURBON

William Shakespeare
Release: 2025-02-23 10:53:12
Original
124 people have browsed it

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:

What is CSS3, SASS, SCSS, COMPASS, LESS, BOURBON

SASS & SCSS:

What is CSS3, SASS, SCSS, COMPASS, LESS, BOURBON

  • SASS (Syntactically Awesome Style Sheets): A CSS extension offering features like nesting, variables, and mixins. Uses indentation for syntax. Server-side processing (typically with Ruby).
  • SCSS (Sassy CSS): Functionally identical to SASS, but uses a CSS-like syntax with curly braces.

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
Copy after login

Compass:

What is CSS3, SASS, SCSS, COMPASS, LESS, BOURBON

  • A CSS framework built on SASS.
  • Provides a library of helpful mixins, cross-browser compatibility features, and typography patterns.
  • Simplifies sprite generation.
  • Easily updated via the command line.

Compass Website Compass Demo Compass Installation 1 Compass Installation 2

Example:

Compass code:

#opacity-10 {
  @include opacity(0.1);
}
Copy after login

Generated CSS:

/* For IE */
#opacity-10 {
  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=10);
  opacity: 0.1;
}

/* For other browsers */
#opacity-10 {
  opacity: 0.1;
}
Copy after login

LESS:

What is CSS3, SASS, SCSS, COMPASS, LESS, BOURBON

  • A JavaScript-based CSS preprocessor, processed client-side.
  • Offers similar functionality to SASS (nesting, variables, mixins).
  • Lacks a framework equivalent to Compass.

LESS Website LESS Demo LESS Documentation LESS vs SASS

Bourbon:

What is CSS3, SASS, SCSS, COMPASS, LESS, BOURBON

  • A lightweight mixin library for SASS.
  • Works seamlessly with tools like CodeKit and Hammer.

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!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template