rem mixin correction

This commit is contained in:
Raphael Goetter 2014-05-03 12:25:11 +02:00
parent 07c0289467
commit 788ceb099b
2 changed files with 11 additions and 23 deletions

View file

@ -58,21 +58,10 @@
// px to em/rem
.rem(@size, @bf: @basefont){
@rem: @size / 10;
font-size: @basefont;
font-size: @basefont * @size / 10;
font-size: unit(@rem, rem);
}
.em(@size, @bf: @basefont){
@em: @size / @bf;
font-size: unit(@em, em);
}
// flow for headings
.flow(@size, @bf: @basefont, @bh: @lh) {
@marg: @bh * @bf / @size;
@mt: unit(@marg,em);
margin-top: @mt;
margin-bottom: 0;
@rem: @size / 10;
font-size: unit(@rem, rem);
@coef: ceil(1/@mt);
line-height: unit((@mt * @coef));
}

View file

@ -79,27 +79,27 @@ caption,
details,
figure,
hgroup {
margin-top: .75em;
margin-top: 0.75em;
margin-bottom: 0;
line-height: @lh;
}
h1, .h1-like {
.flow(@h1-size);
.rem(@h1-size);
}
h2, .h2-like {
.flow(@h2-size);
.rem(@h2-size);
}
h3, .h3-like {
.flow(@h3-size);
.rem(@h3-size);
}
h4, .h4-like {
.flow(@h4-size);
.rem(@h4-size);
}
h5, .h5-like {
.flow(@h5-size);
.rem(@h5-size);
}
h6, .h6-like {
.flow(@h6-size);
.rem(@h6-size);
}
/* alternate font-sizing */
@ -147,13 +147,15 @@ strong,
/* == hiding content */
/* ----------------------------- */
/* hiding content */
.visually-hidden {
position: absolute !important;
clip: rect(1px, 1px, 1px, 1px);
overflow: hidden;
height: 1px; width: 1px;
}
body > script {
display: none !important;
}
@media print {
.no-print {
display: none;
@ -199,9 +201,6 @@ img, table, td, blockquote, code, pre, textarea, input, video {
/* margin-bottom on tables */
table { margin-bottom: @medium-value; }
/* scripts */
body > script {display: none !important;}
/* ----------------------------- */
/* ==layout and modules */