Are you a person with knowledge in Java Script? Are you experienced in dynamic style sheet language then log on to www.wisdomjobs.com. Less (style sheet language) is a dynamic style sheet language designed by Alexis Seller from Berlin. It can serve client-side, it can run server-side, it can be precompiled into CSS. It extends CSS with dynamic tools such as variables, mixins, operations and functions. It can evaluate Java Script inline, it is a dynamic preprocessor style sheet language that can be compiled into cascading style sheets (CSS) and run on the client side or server side. So explore your path into LESS (Style Sheet Language) as Developer, Web designer, programmer by looking into LESS Job interview question and answers given.
Question 1. 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.
Question 2. 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.
Question 3. In What Ways Less Can Be Used?
Answer :
Following are the ways :
Question 4. 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.
Question 5. 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.
Question 6. 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.
Question 7. 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.
Question 8. Mention What Are The Color Channel Functions Used In Less?
Answer :
color channel function used in LESS are as:
Question 9. 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
Question 10. 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.
Question 11. 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.
Question 12. 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.
Question 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
Question 14. What Are The Similarities Between Less And Sass?
Answer :
Between LESS and Sass the similarities are:
Question 15. 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.
Question 16. Explain What Is The Use Of Operations In Less?
Answer :
Operations can be used for performing functions like:
Question 17. Explain What Is The Use Of Escaping?
Answer :
Following are the use of escaping in LESS:
Question 18. What Does Less Elements Contains?
Answer :
Less elements contain commonly used mixins like:
Question 19. List Out Alternatives Against Less?
Answer :
Question 20. 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
Question 21. 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.
Question 22. 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.
Question 23. 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.
Question 24. 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) {
.loop((@counter - 1)); //
next iteration
width: (10px * @counter); // code for each
iteration
}
div {
.loop(5); // launch the loop
}
Output:
div {
width: 10px;
width: 20px;
width: 30px;
width: 40px;
width: 50px;
}
Question 25. 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.
Less (stylesheet language) Related Tutorials |
|
---|---|
CSS3 Tutorial | HTML Tutorial |
HTML 5 Tutorial | EJB(Enterprise JavaBeans) Tutorial |
Git (software) Tutorial | CSS Advanced Tutorial |
SASS (Syntactically Awesome Style sheets) Tutorial | JAVA Persistence API (JPA) Tutorial |
Less (stylesheet language) Related Practice Tests |
|
---|---|
CSS3 Practice Tests | HTML Practice Tests |
HTML 5 Practice Tests | EJB(Enterprise JavaBeans) Practice Tests |
Angular JS Practice Tests | Git (software) Practice Tests |
Advanced jQuery Practice Tests |
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.