updates on CSS files too

This commit is contained in:
Raphael Goetter 2014-04-20 19:56:47 +02:00
parent 6a4bb4ef9e
commit 6ee08ce823
4 changed files with 46 additions and 189 deletions

View file

@ -1,20 +1,13 @@
/* ---------------------------------- */
/* ==classic grids */
/* .. use it when gutter size matters */
/* ---------------------------------- */
/* grids inspired from SUIT https://github.com/suitcss/suit */
/* font-family hack explained here : https://github.com/raphaelgoetter/KNACSS/issues/37 */
.grid {
overflow: hidden;
font-family: FreeSans, Arimo, "Droid Sans", Helvetica, Arial, sans-serif;
}
.grid > * {
display: block;
padding: 0;
@ -24,14 +17,11 @@
letter-spacing: -0.31em;
text-rendering: optimizespeed;
}
/* Opera hack */
.opera:-o-prefocus,
.grid > * {
word-spacing: -0.43em;
}
.grid > * > * {
display: inline-block;
*display: inline;
@ -48,64 +38,49 @@
text-rendering: auto;
font-family: Helvetica, Arial, sans-serif;
}
.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: 1280px) {
@media (max-width: 1024px) {
.grid5 > *,
.grid6 > *,
.grid8 > *,
@ -114,8 +89,7 @@
width: 33.333%;
}
}
@media (max-width: 768px) {
@media (max-width: 480px) {
.grid3 > *,
.grid4 > *,
.grid5 > *,
@ -126,42 +100,31 @@
width: 50%;
}
}
@media (max-width: 480px) {
@media (max-width: 320px) {
.grid > * > * {
width: 100% !important;
}
}
/* ---------------------------------- */
/* ==autogrids */
/* .. to automatically justify blocs */
/* ---------------------------------- */
/* Demo : http://codepen.io/raphaelgoetter/pen/Kqehf */
[class*="autogrid"] {
text-align: justify;
font-family: FreeSans, Arimo, "Droid Sans", Helvetica, Arial, sans-serif;
letter-spacing: -0.31em;
text-rendering: optimizespeed;
}
/* Opera hack */
[class*="autogrid"]:-o-prefocus {
word-spacing: -0.43em;
}
[class*="autogrid"]:after {
content: "";
display: inline-block;
width: 100%;
}
[class*="autogrid"] > * {
display: inline-block;
*display: inline;
@ -171,42 +134,34 @@
letter-spacing: normal;
word-spacing: normal;
vertical-align: top;
text-align: left;
text-rendering: auto;
}
.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: 1280px) {
@media (max-width: 1024px) {
.autogrid5 > *,
.autogrid6 > *,
.autogrid8 > *,
@ -215,8 +170,7 @@
width: 32%;
}
}
@media (max-width: 768px) {
@media (max-width: 480px) {
.autogrid5 > *,
.autogrid6 > *,
.autogrid8 > *,
@ -225,9 +179,8 @@
width: 49%;
}
}
@media (max-width: 480px) {
@media (max-width: 320px) {
[class*="autogrid"] > * {
width: 100%;
}
}
}