top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

What is preprocessor in CSS and why preprocessor use in CSS?

0 votes
What is preprocessor in CSS and why preprocessor use in CSS?
posted Jun 26, 2017 by Anand Huded

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes


A preprocessor is a program that takes one type of data and converts it to another type of data. In the case of HTML and CSS, some of the more popular preprocessor languages include Haml and Sass. Haml is processed into HTML and Sass is processed into CSS.


Haml, known as HTML abstraction markup language, is a markup language with the single goal of providing the ability to write beautiful markup. Serving as its own markup language, code written in Haml is later processed to HTML. Haml promotes DRY and well structured markup, providing a pleasing experience for anyone having to write or read it.


Sass, known as Syntactically Awesome StyleSheets, is a preprocessing language which is compiled to CSS, resembling Haml a bit in that it make writing code easier, and provide quite a bit of leverage in doing so. It allows you to use variables, nested rules, mixins, inline imports, and more, all with a fully CSS-compatible syntax. Sass helps keep large stylesheets well-organized, and get small stylesheets up and running quickly, particularly with the help of the Compass style library.

Use of Preprocessor

You write css in high level with some special syntax (declaring variable, nested syntax, mathematical operations, etc.) and that is compiled to css. Preprocessor helps you to speed up develop, maintain, ensure best practices and also confirms concatenation, compression.

answer Jun 28, 2017 by Sumana
Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.