SASS Interview Questions
SASS Interview Questions
SASS Interview Questions for Fresher
What is sass ?
It is extension of CSS and it is very simple and easy to use.
Explaing syntax of sass ?
It support two types of syntax CSS and Rubby, sass support Rubby syntax and scss support CSS syntax.
Difference between sass and scss ?
Sass is the extension of css and it is very similar to rubby and scss syntax is similar to css.
Give name of sass inventor ?
Hampton Catlin is known as the father of SASS.
Explain some features of sass
- Simple and easy to learn.
- Full CSS3-compatible.
- Many useful functions for manipulating colors and other values.
- It support variable declaration.
- Well-formatted, customizable output.
- Support re-usability concept.
Give list of all directives used in Sass ?
- @import
- @media
- @extend
- @at-root
- @debug
- @warm
- @error
How to declare variable in sass ?
Sass support variable declaration and here you can declare variable using $ sign.
Why use @import directive ?
It is used to import the sass or scss files. It directly takes the filename to import.
Why use @media directive ?
It is used to set style rule to different media types.
Why use @extend directive ?
It specifies and shares the rules and relationships between selectors.
Why use @at-root directive ?
It is specified as a collection of nested rules which is able to make style block at root of the document.
Why use @debug directive ?
This directive is used to detect the errors and display the SassScript expression values to the standard error output stream.
Why use @warn directive ?
This directive is used to get cautionary advice about the problem. It displays the SassScript expression values to the standard error output stream.
Why use @error directive ?
This directive is used to display the SassScript expression value as fatal error.
Data type supported by sass ?
- Numbers (including units)
- Strings (with quotes or without)
- Colors (name, or names)
- Booleans
What are advantages of SASS ?
- It allows writing clean CSS in a programming construct.
- It helps in writing CSS quicker
- Sass is compatible with all versions of CSS, we can use any available CSS libraries.
- It provide code re-usability
Why sass called super set of css ?
Sass is called super set of CSS because it contains all the features of CSS and is an open source pre-processor, coded in Ruby.
What are disadvantages of SASS ?
It takes time for developer to learn new features present in this pre-processor. There are chances of losing benefits of browser's built-in element inspector.
How many way we can use sass ?
There are three way to use sass which is given below;
- As a command line tool
- As a Ruby module
- As a plugin for Rack enable framework
How to write placeholder selector in SASS? ?
SASS supports placeholder selector using class or id selector. In normal CSS, these are specified with "#" or ".", but in SASS they are replaced with "%". ?
How Sass comments are different from regular CSS? ?
Syntax for comments in regular CSS starts with /* comments...*/, while in SASS there are two type of comment, the single line comments // and the multiline CSS comments with /* */.