2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-14 18:42:30 +03:00

updated font mixins courtesy of @apancutt

This commit is contained in:
Mark Otto
2011-11-17 00:37:14 -08:00
parent 5abb4b3200
commit 160970560b
3 changed files with 31 additions and 26 deletions
+21 -16
View File
@@ -46,28 +46,33 @@
// Font Stacks
#font {
.shorthand(@weight: normal, @size: @baseFontSize, @lineHeight: @baseLineHeight) {
#family {
.serif() {
font-family: "Georgia", Times New Roman, Times, serif;
}
.sans-serif() {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.monospace() {
font-family: "Menlo", Monaco, Courier New, monospace;
}
}
.shorthand(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
font-size: @size;
font-weight: @weight;
line-height: @lineHeight;
}
.sans-serif(@weight: normal, @size: @baseFontSize, @lineHeight: @baseLineHeight) {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: @size;
font-weight: @weight;
line-height: @lineHeight;
.serif(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
#font > #family > .serif;
#font > .shorthand(@size, @weight, @lineHeight);
}
.serif(@weight: normal, @size: @baseFontSize, @lineHeight: @baseLineHeight) {
font-family: "Georgia", Times New Roman, Times, serif;
font-size: @size;
font-weight: @weight;
line-height: @lineHeight;
.sans-serif(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
#font > #family > .sans-serif;
#font > .shorthand(@size, @weight, @lineHeight);
}
.monospace(@weight: normal, @size: @baseFontSize, @lineHeight: @baseLineHeight) {
font-family: Menlo, Monaco, Andale Mono, Courier New, monospace;
font-size: @size;
font-weight: @weight;
line-height: @lineHeight;
.monospace(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
#font > #family > .monospace;
#font > .shorthand(@size, @weight, @lineHeight);
}
}