![]() |
VOOZH | about |
Less.js is a simple CSS pre-processor that facilitates the creation of manageable, customizable, and reusable style sheets for websites. Since CSS is a dynamic style sheet language, it is preferred. LESS is adaptable, so it works with a wide range of browsers. Only CSS that has been created and processed using the CSS pre-processor, a computer language, can be used by web browsers. In addition to providing capabilities like variables, functions, mixins, and operations to help create dynamic CSS while maintaining backward compatibility, it is a CSS language extension.
In this article, we are going to discuss the Math tan() function, which is used to do the tangent function on a given value. This function takes a floating number or deg value or rad value as a parameter and performs an tan operation on that value and returns a number.
Syntax:
tan(value)
Parameters:
Compile LESS code into CSS code.
Example 1: The code below demonstrates the usage and implementation of the Misc tan() function.
styles.less:
Now, to compile the above LESS code to CSS code, run the following command:
lessc style.less style.css
The compiled CSS file comes to be:
style.css:
Output:
Example 2: The code below demonstrates the usage and implementation of the Misc tan() function along with isnumber type function if and boolean logical functions.
styles.less:
Now, to compile the above LESS code to CSS code, run the following command:
lessc style.less style.css
The compiled CSS file comes to be:
style.css: