em / rem fixing
This commit is contained in:
parent
03f6bb2263
commit
5fbfa64a19
2 changed files with 9 additions and 10 deletions
|
@ -53,15 +53,14 @@
|
||||||
@gutter : 20px; // gutter value (%, px, em, rem) for grid layouts
|
@gutter : 20px; // gutter value (%, px, em, rem) for grid layouts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// LESS mixins : don't touch or you'll be banned ;)
|
// LESS mixins : don't touch or you'll be banned ;)
|
||||||
// px to em/rem
|
// px to em/rem
|
||||||
.rem(@size, @bf: @basefont){
|
.rem(@size, @bf: @basefont){
|
||||||
@rem: @size / 10;
|
@rem: @size;
|
||||||
font-size: @basefont * @size / 10;
|
font-size: unit(round(@basefont * @size), px);
|
||||||
font-size: unit(@rem, rem);
|
font-size: unit(@rem, rem);
|
||||||
}
|
}
|
||||||
.em(@size, @bf: @basefont){
|
.em(@size, @bf: @basefont){
|
||||||
@em: @size / @bf;
|
@em: @size / @bf;
|
||||||
font-size: unit(@em, em);
|
font-size: unit(round(@em,2), em);
|
||||||
}
|
}
|
|
@ -84,22 +84,22 @@ hgroup {
|
||||||
line-height: @lh;
|
line-height: @lh;
|
||||||
}
|
}
|
||||||
h1, .h1-like {
|
h1, .h1-like {
|
||||||
.rem(@h1-size);
|
.rem(@h1-size / 10);
|
||||||
}
|
}
|
||||||
h2, .h2-like {
|
h2, .h2-like {
|
||||||
.rem(@h2-size);
|
.rem(@h2-size / 10);
|
||||||
}
|
}
|
||||||
h3, .h3-like {
|
h3, .h3-like {
|
||||||
.rem(@h3-size);
|
.rem(@h3-size / 10);
|
||||||
}
|
}
|
||||||
h4, .h4-like {
|
h4, .h4-like {
|
||||||
.rem(@h4-size);
|
.rem(@h4-size / 10);
|
||||||
}
|
}
|
||||||
h5, .h5-like {
|
h5, .h5-like {
|
||||||
.rem(@h5-size);
|
.rem(@h5-size / 10);
|
||||||
}
|
}
|
||||||
h6, .h6-like {
|
h6, .h6-like {
|
||||||
.rem(@h6-size);
|
.rem(@h6-size / 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* alternate font-sizing */
|
/* alternate font-sizing */
|
||||||
|
|
Loading…
Reference in a new issue