Home » Less unit() function

Less unit() function

by Online Tutorials Library

Less unit()

The Less unit function is used to change or remove the unit of dimension. Less supports several number of measurement units like inches, centimeters, points etc.

Parameter:

? dimension: It is used to specify a number with or without dimension.

? unit: It changes the unit.

Let’s take an example to demonstrate the usage of unit function in the Less file.

Create a HTML file named “simple.html”, having the following data.

HTML file: simple.html

You may also like