CSS interview Question/ Answers Set – 4
A CSS Preprocessor is a tool used to extend the basic functionality of default vanilla CSS through its own scripting language. It helps us to use complex logical syntax like – variables, functions, code nesting, and inheritance to name a few, supercharging your vanilla CSS.
SASS: Sass is the acronym for “Syntactically Awesome Style Sheets”. SASS can be written in two different syntax's using SASS or SCSS
SASS vs SCSS
-
SASS is based on indentation and SCSS (Sassy CSS) is not.
-
SASS uses. sass extension while SCSS uses. scss extension.
-
SASS doesn’t use curly brackets or semicolons. SCSS uses it, just like the CSS.
It’s a CSS unit used to measure the height and width in percentage with respect to the viewport. It is used mainly in responsive design techniques. The measure VH is equal to 1/100 of the height of the viewport. If the height of the browser is 1000px, 1vh is equal to 10px. Similarly, if the width is 1000px, then 1 vw is equal to 10px.
Block Element: The block elements always start on a new line. They will also take space for an entire row or width. List of block elements are div, p.
Inline Elements: Inline elements don't start on a new line, they appear on the same line as the content and tags beside them. Some examples of inline elements are a, span , strong, and img tags.
Inline Block Elements: Inline-block elements are similar to inline elements, except they can have padding and margins and set height and width values.
No, it doesn’t affect the inline elements. Inline elements flow with the contents of the page.