Variables in font: shorthand declaration

gerrit's Avatar


09 Jul, 2010 01:53 PM

a declaration like the following gives a syntax error. I'm guessing the slash gets interpreted as a division operation by less, whereas I just want there to be a literal slash. Is there some sort of escape symbol so I can use the font shorthand declaration with both font-size and line-height values?
font: bold @normal_font_size/@base_leading Arial, Helvetica, sans-serif;

  1. 1 Posted by Rachel Reveley on 03 Aug, 2012 09:18 AM

    Rachel Reveley's Avatar

    I am also having this problem. I want to run several websites off a single set of LESS files and so wanted to set the base font size as a variable.

    I thought this might work
    font:@{fs-reset}/1.231 arial,helvetica,clean,sans-serif;

    font:(@fs-reset)/1.231 arial,helvetica,clean,sans-serif;

    but no luck.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac