⊗mkLsBsCF 33 of 41 menu

calc function in LESS

Let's make a function that will wrap the CSS function calc. Let our function take the property name as its first parameter, and the calculated value as its second:

.calc(@name, @calc) { @{name}: calc(@calc); }

Let's use our function:

p { .calc(width, ~'10px + 30%'); }

Compilation result:

p { width: calc(10px + 30%); }

Tell me what the result of compiling the following code will be:

p { .calc(width, ~'10px + 30%'); .calc(height, ~'10px + 30%'); }
English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline