InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Why Do We Need Parametric Mixins In Less? |
|
Answer» Parametric mixinsare same LIKE STANDARD MIXINS. The only difference is that parametric mixins take parameters like functions in JavaScript. After determining parameters to the mixins, you get more CONTROL over mixins. Parametric mixinsare same like standard mixins. The only difference is that parametric mixins take parameters like functions in JavaScript. After determining parameters to the mixins, you get more control over mixins. |
|
| 2. |
How Can You Create A Loop Structures In Less? |
|
Answer» A mixin can call itself in LESS. Such recursive MIXINS, when COMBINED with Pattern matching and Guard Expressions, can be used to create various iterative/loop structures. Example: .loop(@counter) when (@counter > 0) { A mixin can call itself in LESS. Such recursive mixins, when combined with Pattern matching and Guard Expressions, can be used to create various iterative/loop structures. Example: .loop(@counter) when (@counter > 0) { |
|
| 3. |
Explain How Merge Function Is Used In Less? |
|
Answer» For aggregating values from multiple PROPERTIES into a SPACE or COMMA SEPARATED list under a single property LESS is used. It is useful for properties such as transform and background. For aggregating values from multiple properties into a space or comma separated list under a single property LESS is used. It is useful for properties such as transform and background. |
|
| 4. |
Explain How You Can Pre-compile Less Into Css? |
|
Answer» To pre-compile LESS into CSS you can USE: Run less.js using Node.js : By using the Node.js JavaScript framework you can run the less.js script outside the BROWSER. Use lessphp: For the IMPLEMENTATION of the LESS compiler WRITTEN in PHP, lessphp is used. Use online Compiler: Use online compiler for quick compilation of LESS code without installing a compiler Less. app (for Mac users): Less.app is a free tool for Mac users, this tool auto compiles them into CSS files. To pre-compile LESS into CSS you can use: Run less.js using Node.js : By using the Node.js JavaScript framework you can run the less.js script outside the browser. Use lessphp: For the implementation of the LESS compiler written in PHP, lessphp is used. Use online Compiler: Use online compiler for quick compilation of LESS code without installing a compiler Less. app (for Mac users): Less.app is a free tool for Mac users, this tool auto compiles them into CSS files. |
|
| 5. |
What Is The Use Of E () Function? |
|
Answer» With the help of E()FUNCTION you can escape a VALUE so that it passes straight through to the compiled CSS, without being noticed by the LESS COMPILER. With the help of e()function you can escape a value so that it passes straight through to the compiled CSS, without being noticed by the LESS compiler. |
|
| 6. |
Explain How You Can Invoke The Compiler From The Command Line? |
|
Answer» You can INVOKE the compiler from the command LINE in LESS as $ lessc styles.less This will output the compiled CSS to stdout; you may then redirect it to a FILE of your choice $ lessc styles.less > styles.css You can invoke the compiler from the command line in LESS as $ lessc styles.less This will output the compiled CSS to stdout; you may then redirect it to a file of your choice $ lessc styles.less > styles.css |
|
| 7. |
List Out Alternatives Against Less? |
Answer»
|
|
| 8. |
What Does Less Elements Contains? |
|
Answer» Less elements CONTAIN COMMONLY used mixins LIKE:
Less elements contain commonly used mixins like: |
|
| 9. |
Explain What Is The Use Of Escaping? |
|
Answer» Following are the use of escaping in LESS:
Following are the use of escaping in LESS: |
|
| 10. |
Explain What Is The Use Of Operations In Less? |
|
Answer» OPERATIONS can be used for performing functions like:
Operations can be used for performing functions like: |
|
| 11. |
Explain What Is The Use Of &combinator? |
|
Answer» &combinatorconcatenates nested SELECTOR with the parent selector. It is USEFUL for PSEUDO classes such as :HOVER and :focus. &combinatorconcatenates nested selector with the parent selector. It is useful for Pseudo classes such as :hover and :focus. |
|
| 12. |
What Are The Similarities Between Less And Sass? |
|
Answer» Between LESS and Sass the similarities are:
Between LESS and Sass the similarities are: |
|
| 13. |
List Out The Differences Between Less And Sass? |
|
Answer» Each style-sheet language is good in their perspective and use; however there are few differences in their usage. LESS
Sass
Each style-sheet language is good in their perspective and use; however there are few differences in their usage. LESS Sass |
|
| 14. |
Explain What Is “strictimports” In Less? |
|
Answer» The strictImports controls whether the compiler will ALLOW a @importinside of EITHER @MEDIA BLOCKS or other selector blocks. The strictImports controls whether the compiler will allow a @importinside of either @media blocks or other selector blocks. |
|
| 15. |
Explain What Is The Use Of Extend “all” In Less? |
|
Answer» When you specify all keyword LAST in an EXTEND argument, it tells LESS to MATCH that SELECTOR as part of another selector. When you specify all keyword last in an extend argument, it tells LESS to match that selector as part of another selector. |
|
| 16. |
Explain What “source Map Less Inline”? |
|
Answer» The “SOURCE MAP Less INLINE” option indicates that we should include all of the CSS files into the sourcemap. Which MEANS that you only need your map file to get to your original source. The “Source Map Less Inline” option indicates that we should include all of the CSS files into the sourcemap. Which means that you only need your map file to get to your original source. |
|
| 17. |
Explain What Is Data-uri In Less? |
|
Answer» In CSS, Data URI’sis one of the BEST TECHNIQUE, it allows DEVELOPERS to avoid external image referencing and instead embed them DIRECTLY into a STYLESHEET. Data URIs are the excellent way to reduce HTTP requests In CSS, Data URI’sis one of the best technique, it allows developers to avoid external image referencing and instead embed them directly into a stylesheet. Data URIs are the excellent way to reduce HTTP requests |
|
| 18. |
Mention What Are The Color Channel Functions Used In Less? |
|
Answer» color channel function USED in LESS are as:
color channel function used in LESS are as: |
|
| 19. |
Explain What Is The Meaning Of Nesting In Less Programming? |
|
Answer» Nesting in LESS is clustering of statements INSIDE other statements, so it forms a GROUP of related CODE. In other words when we add a code snippet and add ANOTHER code inside it, then that code snippet is called nesting. Nesting in LESS is clustering of statements inside other statements, so it forms a group of related code. In other words when we add a code snippet and add another code inside it, then that code snippet is called nesting. |
|
| 20. |
Explain How Can Set Code In A Watch Mode When You Run Less.js In An Html5 Browser? |
|
Answer» If you run LESS.js in an HTML5 browser, it will USE local storage to cache the generated CSS. However, from the developer point of VIEW they cannot see the CHANGES they made instantly. In order to see your changes instantly, you can load program in development and watch mode by following JAVASCRIPT. If you run LESS.js in an HTML5 browser, it will use local storage to cache the generated CSS. However, from the developer point of view they cannot see the changes they made instantly. In order to see your changes instantly, you can load program in development and watch mode by following JavaScript. |
|
| 21. |
Explain How Mixins Is Useful? |
|
Answer» Mixins enable EMBEDDING all the PROPERTIES of a CLASS into another class by INCLUDING the class name as one of its properties. It is just like variables but for whole CLASSES. Mixins enable embedding all the properties of a class into another class by including the class name as one of its properties. It is just like variables but for whole classes. |
|
| 22. |
How Variable Is Represented In Less? |
|
Answer» LESS ALLOWS variables to be DEFINED. In LESS, the variable is represented as @ SING. While, variable assignment is done with a : (colon) sing. The VALUES of the variables are INSERTED into the CSS output file as well as minified file. LESS allows variables to be defined. In LESS, the variable is represented as @ sing. While, variable assignment is done with a : (colon) sing. The values of the variables are inserted into the CSS output file as well as minified file. |
|
| 23. |
In What Ways Less Can Be Used? |
|
Answer» Following are the ways :
Following are the ways : |
|
| 24. |
Explain How To Create Less File And Where To Store It And Compile It? |
|
Answer» CREATING or storing LESS file is SIMILAR to creating/storing CSS file. A NEW LESS file can be created with a .less extension, or you can rename existing .css file to .less file. You can write LESS code with existing CSS code. The best way of creating it inside ~/content/ or ~/Styles/ folder. Creating or storing LESS file is similar to creating/storing CSS file. A new LESS file can be created with a .less extension, or you can rename existing .css file to .less file. You can write LESS code with existing CSS code. The best way of creating it inside ~/content/ or ~/Styles/ folder. |
|
| 25. |
Explain What Is Less? |
|
Answer» LESS is dynamic STYLE sheet producing LANGUAGE. LESS is a CSS pre-processors and extends CSS with dynamic behavior. It allows for variables, MIXINS, operations and functions. LESS RUNS on server SIDE and client side both. LESS is dynamic style sheet producing language. LESS is a CSS pre-processors and extends CSS with dynamic behavior. It allows for variables, mixins, operations and functions. LESS runs on server side and client side both. |
|