Tell me have you used Sass? What's good about it?
Submitted by: MuhammadEvery web project starts with everything neat, all CSS is organized in blocks or different CSS files and you know where everything is, right?
Right, until your project gets bigger, deadlines get tight, more developers come on board and someday you notice a strange behavior in some elements of the page. When you inspect their styles you spot lots of css overrides coming from everywhere. This is the moment you realize how messy CSS can be.
Sass is the modern way of doing CSS and can save many lines of code in your stylesheets. This is possible because Sass works with variables, nested syntax and mathematical operations.
In my opinion one of the nicest features of sass is the possibility to write a selector just once and put all styles for that inside it. Do you need a more specific selector under an existing one? Just nest the specifics into the generic one.
Check out the example below taken from their official website. It's awesome how it can "neatify" your code.
/* .sass */
table.hl
margin: 2em 0
td.ln
text-align: right
li
font:
family: serif
weight: bold
size: 1.2em
/* .css */
table.hl {
margin: 2em 0;
}
table.hl td.ln {
text-align: right;
}
li {
font-family: serif;
font-weight: bold;
font-size: 1.2em;
}
Submitted by: Muhammad
Right, until your project gets bigger, deadlines get tight, more developers come on board and someday you notice a strange behavior in some elements of the page. When you inspect their styles you spot lots of css overrides coming from everywhere. This is the moment you realize how messy CSS can be.
Sass is the modern way of doing CSS and can save many lines of code in your stylesheets. This is possible because Sass works with variables, nested syntax and mathematical operations.
In my opinion one of the nicest features of sass is the possibility to write a selector just once and put all styles for that inside it. Do you need a more specific selector under an existing one? Just nest the specifics into the generic one.
Check out the example below taken from their official website. It's awesome how it can "neatify" your code.
/* .sass */
table.hl
margin: 2em 0
td.ln
text-align: right
li
font:
family: serif
weight: bold
size: 1.2em
/* .css */
table.hl {
margin: 2em 0;
}
table.hl td.ln {
text-align: right;
}
li {
font-family: serif;
font-weight: bold;
font-size: 1.2em;
}
Submitted by: Muhammad
Read Online Front End Developer (AngularJS) Job Interview Questions And Answers
Top Front End Developer (AngularJS) Questions
☺ | What is AngularJS? What are the key features of AngularJS? Is there any down-side of using AngularJS? |
☺ | What is an IIFE? |
☺ | Explain me your workflow when you create a web page? |
☺ | How can you add a method to a class already defined? |
☺ | Why is this project called "AngularJS"? Why is the namespace called "ng"? |
Top Scripting language Categories
☺ | AngularJS Interview Questions. |
☺ | Ext-JS Interview Questions. |
☺ | Dojo Interview Questions. |
☺ | Expert Developer JavaScript Interview Questions. |
☺ | jQuery Mobile Interview Questions. |