IE font-size fixing

This commit is contained in:
Raphael Goetter 2014-05-19 10:46:39 +02:00
parent 9acce25176
commit dd856d6755
12 changed files with 1088 additions and 1534 deletions

View file

@ -1,5 +1,5 @@
/*!
* www.KNACSS.com V3.0.2 (2014-05-07) @author: Raphael Goetter, Alsacreations
* www.KNACSS.com V3.0.3 (2014-05-19) @author: Raphael Goetter, Alsacreations
* Licence WTFPL http://www.wtfpl.net/
*/
@ -16,7 +16,6 @@
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* soft reset */
html,
@ -24,55 +23,50 @@ body {
margin: 0;
padding: 0;
}
ul,
ol {
padding-left: 2em;
}
ul.unstyled {
list-style: none;
}
img {
height: auto;
vertical-align: middle;
border: 0;
}
audio,
canvas,
video {
display: inline-block;
}
svg:not(:root) {
overflow: hidden;
}
/* ----------------------------- */
/* == typography */
/* ----------------------------- */
/* base font-size corresponds to "10px" and is adapted to rem unit */
html {
/* set base font-size to equiv "10px", which is adapted to rem unit */
font-size: 62.5%;
/* IE9-IE11 math fixing. See http://bit.ly/1g4X0bX */
/* thanks to @guardian, @victorbritopro and @eQRoeil */
font-size: calc(1em * 0.625);
/* disallow text zooming on orientation change (non standard property) */
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
text-size-adjust: 100%;
}
body {
/* set body font-size in em (1.4em equiv "14px") */
font-size: 1.4em;
background-color: #ffffff;
color: #000000;
font-family: Helvetica, Arial, sans-serif;
font-size: 1.4em;
line-height: 1.5;
}
/* font-sizing for content */
p,
@ -93,70 +87,57 @@ figure {
margin-bottom: 0;
line-height: 1.5;
}
h1,
.h1-like {
font-size: 3.2rem;
}
h2,
.h2-like {
font-size: 2.8rem;
}
h3,
.h3-like {
font-size: 2.4rem;
}
h4,
.h4-like {
font-size: 2rem;
}
h5,
.h5-like {
font-size: 1.8rem;
}
h6,
.h6-like {
font-size: 1.6rem;
}
/* alternate font-sizing */
.smaller {
font-size: 0.71em;
}
.small {
font-size: 0.86em;
}
.big {
font-size: 1.14em;
}
.bigger {
font-size: 1.29em;
}
.biggest {
font-size: 1.43em;
}
code,
pre,
samp,
kbd {
white-space: pre-line;
/* IE fix */
white-space: pre-line;
white-space: pre-wrap;
font-family: Consolas, 'DejaVu Sans Mono', Courier, monospace;
line-height: normal;
}
em,
.em,
address,
@ -166,26 +147,21 @@ i,
var {
font-style: italic;
}
.no-em {
font-style: normal;
}
strong,
.strong {
font-weight: bold;
}
.no-strong {
font-weight: normal;
}
small,
sub,
sup {
font-size: smaller;
}
/* ----------------------------- */
/* == hiding content */
@ -203,23 +179,19 @@ sup {
overflow: hidden !important;
clip: rect(1px, 1px, 1px, 1px) !important;
}
body > script {
display: none !important;
}
@media (max-width: 480px) {
.no-small-screen {
display: none;
}
}
@media (min-width: 1024px) {
.no-large-screen {
display: none;
}
}
/* ----------------------------- */
/* == browsers consistency */
@ -243,7 +215,6 @@ h5:first-child,
h6:first-child {
margin-top: 0;
}
/* avoid margins on nested elements */
li p,
@ -253,7 +224,6 @@ li ol {
margin-top: 0;
margin-bottom: 0;
}
/* max values */
img,
@ -267,13 +237,11 @@ input,
video {
max-width: 100%;
}
/* margin-bottom on tables */
table {
margin-bottom: 2em;
}
/* ----------------------------- */
/* ==layout and modules */
@ -287,7 +255,6 @@ table {
.mod {
overflow: hidden;
}
/* blocks that needs to be placed under floats */
.clear,
@ -295,7 +262,6 @@ table {
.row {
clear: both;
}
/* blocks that must contain floats */
.clearfix:after,
@ -304,7 +270,6 @@ table {
display: table;
clear: both;
}
/* table layout */
.row {
@ -312,20 +277,17 @@ table {
table-layout: fixed;
width: 100%;
}
.row > *,
.col {
display: table-cell;
vertical-align: top;
}
/* inline-block */
.inbl {
display: inline-block;
vertical-align: top;
}
/* alignments (blocks and inline) */
/* ------------------------------ */
@ -336,320 +298,243 @@ table {
.start {
float: left;
}
img.left,
img.start {
margin-right: 1em;
}
/* right (or ending) elements */
.right,
.end {
float: right;
}
img.right,
img.end {
margin-left: 1em;
}
img.left,
img.right,
img.start,
img.end {
margin-bottom: 0.5em;
}
.center {
margin-left: auto;
margin-right: auto;
}
.txtleft {
text-align: left;
}
.txtright {
text-align: right;
}
.txtcenter {
text-align: center;
}
.w10 {
width: 10%;
}
.w20 {
width: 20%;
}
.w25 {
width: 25%;
}
.w30 {
width: 30%;
}
.w33 {
width: 33.3333%;
}
.w40 {
width: 40%;
}
.w50 {
width: 50%;
}
.w60 {
width: 60%;
}
.w66 {
width: 66.6666%;
}
.w70 {
width: 70%;
}
.w75 {
width: 75%;
}
.w80 {
width: 80%;
}
.w90 {
width: 90%;
}
.w100 {
width: 100%;
}
.w50p {
width: 50px;
}
.w100p {
width: 100px;
}
.w150p {
width: 150px;
}
.w200p {
width: 200px;
}
.w300p {
width: 300px;
}
.w400p {
width: 400px;
}
.w500p {
width: 500px;
}
.w600p {
width: 600px;
}
.w700p {
width: 700px;
}
.w800p {
width: 800px;
}
.w960p {
width: 960px;
}
.mw960p {
max-width: 960px;
}
.w1140p {
width: 1140px;
}
.mw1140p {
max-width: 1140px;
}
.wauto {
width: auto;
}
.man {
margin: 0;
}
.pan {
padding: 0;
}
.mas {
margin: 1em;
}
.mam {
margin: 2em;
}
.mal {
margin: 4em;
}
.pas {
padding: 1em;
}
.pam {
padding: 2em;
}
.pal {
padding: 4em;
}
.mtn {
margin-top: 0;
}
.mts {
margin-top: 1em;
}
.mtm {
margin-top: 2em;
}
.mtl {
margin-top: 4em;
}
.mrn {
margin-right: 0;
}
.mrs {
margin-right: 1em;
}
.mrm {
margin-right: 2em;
}
.mrl {
margin-right: 4em;
}
.mbn {
margin-bottom: 0;
}
.mbs {
margin-bottom: 1em;
}
.mbm {
margin-bottom: 2em;
}
.mbl {
margin-bottom: 4em;
}
.mln {
margin-left: 0;
}
.mls {
margin-left: 1em;
}
.mlm {
margin-left: 2em;
}
.mll {
margin-left: 4em;
}
.ptn {
padding-top: 0;
}
.pts {
padding-top: 1em;
}
.ptm {
padding-top: 2em;
}
.ptl {
padding-top: 4em;
}
.prn {
padding-right: 0;
}
.prs {
padding-right: 1em;
}
.prm {
padding-right: 2em;
}
.prl {
padding-right: 4em;
}
.pbn {
padding-bottom: 0;
}
.pbs {
padding-bottom: 1em;
}
.pbm {
padding-bottom: 2em;
}
.pbl {
padding-bottom: 4em;
}
.pln {
padding-left: 0;
}
.pls {
padding-left: 1em;
}
.plm {
padding-left: 2em;
}
.pll {
padding-left: 4em;
}

View file

@ -15,107 +15,84 @@
}
/* global styles for direct child ex. .grid3 */
/* 1- gutter value */
.grid > * {
display: block;
padding: 0;
/* gutter value */
margin-left: -20px;
/* 1 */
text-align: left;
}
/* global styles for each "cell" */
/* 1- gutter value */
.grid > * > * {
display: inline-block;
/* gutter value */
padding-left: 20px;
/* 1 */
margin-left: 0;
vertical-align: top;
}
/* whitespace fixing for modern browsers including IE9+ */
/* 1- fallback for IE9+ */
/* 2- fallback for Opera Mini */
:root .grid {
font-size: 0;
text-justify: distribute-all-lines; /* 1 */
/* fallback for IE9+ */
text-justify: distribute-all-lines;
}
:root .grid > * > * {
/* fallback for Opera Mini */
font-size: 14px;
/* 2 */
font-size: 1.4rem;
}
/* Opera hack */
.opera:-o-prefocus,
.grid > * {
word-spacing: -0.43em;
}
.grid2 > * {
width: 50%;
}
.grid3 > * {
width: 33.333%;
}
.grid4 > * {
width: 25%;
}
.grid5 > * {
width: 20%;
}
.grid6 > * {
width: 16.667%;
}
.grid8 > * {
width: 12.5%;
}
.grid10 > * {
width: 10%;
}
.grid12 > * {
width: 8.333%;
}
/* unequal grids (1-2, 2-1, 1-3 and 3-1) for 2 blocks */
.grid2-1 > *:first-child,
.grid1-2 > * + * {
width: 66.666%;
}
.grid1-2 > *:first-child,
.grid2-1 > * + * {
width: 33.333%;
}
.grid1-3 > *:first-child,
.grid3-1 > * + * {
width: 25%;
}
.grid3-1 > *:first-child,
.grid1-3 > * + * {
width: 75%;
}
/* Responsiv-o-matic */
@media (max-width: 1024px) {
.grid5 > *,
.grid6 > *,
@ -125,7 +102,6 @@
width: 33.333%;
}
}
@media (max-width: 480px) {
.grid3 > *,
.grid4 > *,
@ -137,13 +113,11 @@
width: 50%;
}
}
@media (max-width: 320px) {
.grid > * > * {
width: 100% !important;
}
}
/* ---------------------------------- */
/* ==autogrids */
@ -159,72 +133,57 @@
[class*="autogrid"] {
text-align: justify;
}
[class*="autogrid"]:after {
content: "";
display: inline-block;
width: 100%;
}
[class*="autogrid"] > * {
display: inline-block;
vertical-align: top;
text-align: left;
}
/* whitespace fixing for modern browsers including IE9+ */
/* 1- fallback for IE9+ */
/* 2- fallback for Opera Mini */
:root [class*="autogrid"] {
:root[class*="autogrid"] {
font-size: 0;
text-justify: distribute-all-lines; /* 1 */
/* fallback for IE9+ */
text-justify: distribute-all-lines;
}
:root [class*="autogrid"] > * {
:root[class*="autogrid"] > * {
/* fallback for Opera Mini */
font-size: 14px;
/* 2 */
font-size: 1.4rem;
}
/* Opera hack */
[class*="autogrid"]:-o-prefocus {
word-spacing: -0.43em;
}
.autogrid2 > * {
width: 49%;
}
.autogrid3 > * {
width: 32%;
}
.autogrid4 > * {
width: 23.6%;
}
.autogrid5 > * {
width: 19%;
}
.autogrid6 > * {
width: 15%;
}
.autogrid8 > * {
width: 10.8%;
}
.autogrid10 > * {
width: 9%;
}
.autogrid12 > * {
width: 6.4%;
}
@media (max-width: 1024px) {
.autogrid5 > *,
.autogrid6 > *,
@ -234,7 +193,6 @@
width: 32%;
}
}
@media (max-width: 480px) {
.autogrid5 > *,
.autogrid6 > *,
@ -244,7 +202,6 @@
width: 49%;
}
}
@media (max-width: 320px) {
[class*="autogrid"] > * {
width: 100%;

View file

@ -5,11 +5,11 @@
/* ----------------------------- */
@media (min-width: 480px) {
/* here go rules for big resources and big screens like: background-images, font-faces, etc. */
/* rules for big resources and big screens like: background-images, font-faces, etc. */
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 2dppx) {
/* Style adjustments for retina devices */
/* style adjustments for high density devices */
}
/* ---------------------------------- */

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
@import "00-config";
/*!
* www.KNACSS.com V3.0.2 (2014-05-07) @author: Raphael Goetter, Alsacreations
* www.KNACSS.com V3.0.3 (2014-05-019) @author: Raphael Goetter, Alsacreations
* Licence WTFPL http://www.wtfpl.net/
*/
@ -49,19 +49,29 @@ svg:not(:root) {
/* == typography */
/* ----------------------------- */
/* base font-size corresponds to "10px" and is adapted to rem unit */
html {
/* set base font-size to equiv "10px", which is adapted to rem unit */
font-size: 62.5%;
/* IE9-IE11 math fixing. See http://bit.ly/1g4X0bX */
/* thanks to @guardian, @victorbritopro and @eQRoeil */
font-size: calc(1em * 0.625);
/* disallow text zooming on orientation change (non standard property) */
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
text-size-adjust: 100%;
}
body {
/* set body font-size in em (1.4em equiv "14px") */
font-size: unit((@base-font-size / 10), em);
background-color: @base-background;
color: @base-color;
font-family: @font-stack-common;
font-size: unit((@base-font-size / 10), em);
line-height: @line-height;
}
@ -140,7 +150,8 @@ code,
pre,
samp,
kbd {
white-space: pre-line; /* IE fix */
/* IE fix */
white-space: pre-line;
white-space: pre-wrap;
font-family: @font-stack-monospace;
line-height: normal;

View file

@ -13,32 +13,33 @@
}
/* global styles for direct child ex. .grid3 */
/* 1- gutter value */
.grid > * {
display: block;
padding: 0;
margin-left: -@gutter; /* 1 */
/* gutter value */
margin-left: -@gutter;
text-align: left;
}
/* global styles for each "cell" */
/* 1- gutter value */
.grid > * > * {
display: inline-block;
padding-left: @gutter; /* 1 */
/* gutter value */
padding-left: @gutter;
margin-left: 0;
vertical-align: top;
}
/* whitespace fixing for modern browsers including IE9+ */
/* 1- fallback for IE9+ */
/* 2- fallback for Opera Mini */
:root .grid {
font-size: 0;
text-justify: distribute-all-lines; /* 1 */
/* fallback for IE9+ */
text-justify: distribute-all-lines;
}
:root .grid > * > * {
font-size: @base-font-size; /* 2 */
/* fallback for Opera Mini */
font-size: @base-font-size;
font-size: unit((@base-font-size / 10), rem);
}
@ -153,15 +154,15 @@
}
/* whitespace fixing for modern browsers including IE9+ */
/* 1- fallback for IE9+ */
/* 2- fallback for Opera Mini */
:root [class*="autogrid"] {
font-size: 0;
text-justify: distribute-all-lines; /* 1 */
/* fallback for IE9+ */
text-justify: distribute-all-lines;
}
:root [class*="autogrid"] > * {
font-size: @base-font-size; /* 2 */
/* fallback for Opera Mini */
font-size: @base-font-size;
font-size: unit((@base-font-size / 10), rem);
}

View file

@ -4,8 +4,7 @@
/* ----------------------------- */
/* thanks to HTML5boilerplate,
* github.com/nathansmith/formalize
* and www.sitepen.com
* github.com/nathansmith/formalize and www.sitepen.com
*/
/* buttons */

View file

@ -4,11 +4,11 @@
/* ----------------------------- */
@media (min-width: @small-screen) {
/* here go rules for big resources and big screens like: background-images, font-faces, etc. */
/* rules for big resources and big screens like: background-images, font-faces, etc. */
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 2dppx) {
/* Style adjustments for retina devices */
/* style adjustments for high density devices */
}
/* ---------------------------------- */

View file

@ -1,6 +1,6 @@
@import "00-config";
/*!
* www.KNACSS.com V3.0.2 (2014-05-07) @author: Raphael Goetter, Alsacreations (with help from Hugo Giraudel)
* www.KNACSS.com V3.0.3 (2014-05-19) @author: Raphael Goetter, Alsacreations (with help from Hugo Giraudel)
* Licence WTFPL http://www.wtfpl.net/
*/
@ -49,19 +49,28 @@ svg:not(:root) {
/* == typography */
/* ----------------------------- */
/* base font-size corresponds to "10px" and is adapted to rem unit */
html {
/* set base font-size to equiv "10px", which is adapted to rem unit */
font-size: 62.5%;
/* IE9-IE11 math fixing. See http://bit.ly/1g4X0bX */
/* thanks to @guardian, @victorbritopro and @eQRoeil */
font-size: calc(1em * 0.625);
/* disallow text zooming on orientation change (non standard property) */
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
text-size-adjust: 100%;
}
body {
/* set body font-size in em (1.4em equiv "14px") */
font-size: ($base-font-size / 10px) + em;
background-color: $base-background;
color: $base-color;
font-family: $font-stack-common;
font-size: ($base-font-size / 10px) + em;
line-height: $line-height;
}
@ -134,7 +143,8 @@ code,
pre,
samp,
kbd {
white-space: pre-line; /* IE fix */
/* IE fix */
white-space: pre-line;
white-space: pre-wrap;
font-family: $font-stack-monospace;
line-height: normal;

View file

@ -13,33 +13,33 @@
}
/* global styles for direct child ex. .grid3 */
/* 1- gutter value */
.grid > * {
display: block;
padding: 0;
margin-left: -$gutter; /* 1 */
/* gutter value */
margin-left: -$gutter;
text-align: left;
}
/* global styles for each "cell" */
/* 1- gutter value */
.grid > * > * {
display: inline-block;
padding-left: $gutter; /* 1 */
/* gutter value */
padding-left: $gutter;
margin-left: 0;
vertical-align: top;
}
/* whitespace fixing for modern browsers including IE9+ */
/* 1- fallback for IE9+ */
/* 2- fallback for Opera Mini */
:root .grid {
font-size: 0;
text-justify: distribute-all-lines; /* 1 */
/* fallback for IE9+ */
text-justify: distribute-all-lines;
}
:root .grid > * > * {
font-size: $base-font-size; /* 2 */
/* fallback for Opera Mini */
font-size: $base-font-size;
font-size: ($base-font-size / 10px) + rem;
}
@ -154,15 +154,15 @@
}
/* whitespace fixing for modern browsers including IE9+ */
/* 1- fallback for IE9+ */
/* 2- fallback for Opera Mini */
:root [class*="autogrid"] {
font-size: 0;
text-justify: distribute-all-lines; /* 1 */
/* fallback for IE9+ */
text-justify: distribute-all-lines;
}
:root [class*="autogrid"] > * {
font-size: $base-font-size; /* 2 */
/* fallback for Opera Mini */
font-size: $base-font-size;
font-size: ($base-font-size / 10px) + rem;
}

View file

@ -4,8 +4,7 @@
/* ----------------------------- */
/* thanks to HTML5boilerplate,
* github.com/nathansmith/formalize
* and www.sitepen.com
* github.com/nathansmith/formalize and www.sitepen.com
*/
/* buttons */

View file

@ -4,11 +4,11 @@
/* ----------------------------- */
@media (min-width: $small-screen) {
/* here go rules for big resources and big screens like: background-images, font-faces, etc. */
/* rules for big resources and big screens like: background-images, font-faces, etc. */
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 2dppx) {
/* Style adjustments for retina devices */
/* style adjustments for high density devices */
}
/* ---------------------------------- */