twitter/bootstrap — Issue #1766: [2.0.1] Add room for custom fonts in the #font namespace
Author: Anahkiasen
Created: 2012-02-06 14:05:49+00:00
State: open

The #font mixin is very useful for setting quickly the font properties of a block, unfortunately it doesn't let you use custom fonts unless you redefine font-family right after. And you then lose the default fallback fonts (note: which is the main point of this issue).
That's why I think there should be a new mixing : #font .custom – I don't know yet how to really implement the whole serif/sans-serif difference, unless we say that by default custom fonts fall back to sans-serif fonts, but here's what it could look like :

#font {
#family {
.custom(@font) {
font-family: @font, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
}
.custom(@font, @size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
#font > #family > .custom-sans-serif(@font);
#font > .shorthand(@size, @weight, @lineHeight);
}
}