2014-01-31 15:30:55 +01:00
|
|
|
@import "00-config";
|
2014-02-01 18:37:56 +01:00
|
|
|
|
|
|
|
/* ---------------------------------- */
|
|
|
|
/* ==classic grids */
|
|
|
|
/* .. use it when gutter size matters */
|
|
|
|
/* ---------------------------------- */
|
|
|
|
|
2013-09-12 11:59:14 +02:00
|
|
|
/* grids inspired from SUIT https://github.com/suitcss/suit */
|
|
|
|
|
2014-05-07 10:45:47 +02:00
|
|
|
/* overall container of grids */
|
|
|
|
.grid {
|
2013-10-13 10:50:39 +02:00
|
|
|
overflow: hidden;
|
|
|
|
}
|
2014-05-07 10:45:47 +02:00
|
|
|
|
|
|
|
/* global styles for direct child ex. .grid3 */
|
|
|
|
/* 1- gutter value */
|
|
|
|
.grid > * {
|
2013-09-12 11:59:14 +02:00
|
|
|
display: block;
|
|
|
|
padding: 0;
|
2014-05-07 10:45:47 +02:00
|
|
|
margin-left: -@gutter; /* 1 */
|
2013-09-12 11:59:14 +02:00
|
|
|
text-align: left;
|
2014-05-03 11:08:29 +02:00
|
|
|
}
|
2014-05-07 10:45:47 +02:00
|
|
|
|
|
|
|
/* global styles for each "cell" */
|
|
|
|
/* 1- gutter value */
|
|
|
|
.grid > * > * {
|
2014-05-03 11:08:29 +02:00
|
|
|
display: inline-block;
|
2014-05-07 10:45:47 +02:00
|
|
|
padding-left: @gutter; /* 1 */
|
2014-05-03 11:08:29 +02:00
|
|
|
margin-left: 0;
|
|
|
|
vertical-align: top;
|
|
|
|
}
|
2014-05-07 10:45:47 +02:00
|
|
|
|
2014-05-03 11:08:29 +02:00
|
|
|
/* whitespace fixing for modern browsers including IE9+ */
|
2014-05-09 10:54:30 +02:00
|
|
|
/* 1- fallback for IE9+ */
|
|
|
|
/* 2- fallback for Opera Mini */
|
2014-05-03 11:08:29 +02:00
|
|
|
:root .grid {
|
|
|
|
font-size: 0;
|
2014-05-09 10:54:30 +02:00
|
|
|
text-justify: distribute-all-lines; /* 1 */
|
2014-05-03 11:08:29 +02:00
|
|
|
}
|
|
|
|
:root .grid > * > * {
|
2014-05-09 10:54:30 +02:00
|
|
|
font-size: @base-font-size; /* 2 */
|
2014-05-04 15:30:21 +02:00
|
|
|
font-size: unit((@base-font-size / 10), rem);
|
2013-09-12 11:59:14 +02:00
|
|
|
}
|
2014-05-07 10:45:47 +02:00
|
|
|
|
2013-09-26 20:38:02 +02:00
|
|
|
/* Opera hack */
|
|
|
|
.opera:-o-prefocus,
|
|
|
|
.grid > * {
|
|
|
|
word-spacing: -0.43em;
|
|
|
|
}
|
2014-05-07 10:45:47 +02:00
|
|
|
|
|
|
|
.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%;
|
|
|
|
}
|
2013-09-12 11:59:14 +02:00
|
|
|
|
|
|
|
/* unequal grids (1-2, 2-1, 1-3 and 3-1) for 2 blocks */
|
|
|
|
.grid2-1 > *:first-child,
|
2014-05-07 10:45:47 +02:00
|
|
|
.grid1-2 > * + * {
|
|
|
|
width: 66.666%;
|
|
|
|
}
|
|
|
|
|
2013-09-12 11:59:14 +02:00
|
|
|
.grid1-2 > *:first-child,
|
2014-05-07 10:45:47 +02:00
|
|
|
.grid2-1 > * + * {
|
|
|
|
width: 33.333%;
|
|
|
|
}
|
|
|
|
|
2013-09-12 11:59:14 +02:00
|
|
|
.grid1-3 > *:first-child,
|
2014-05-07 10:45:47 +02:00
|
|
|
.grid3-1 > * + * {
|
|
|
|
width: 25%;
|
|
|
|
}
|
|
|
|
|
2013-09-12 11:59:14 +02:00
|
|
|
.grid3-1 > *:first-child,
|
2014-05-07 10:45:47 +02:00
|
|
|
.grid1-3 > * + * {
|
|
|
|
width: 75%;
|
|
|
|
}
|
2013-09-12 11:59:14 +02:00
|
|
|
|
|
|
|
/* Responsiv-o-matic */
|
2014-04-20 19:52:20 +02:00
|
|
|
@media (max-width: @large-screen) {
|
2013-09-12 11:59:14 +02:00
|
|
|
.grid5 > *,
|
|
|
|
.grid6 > *,
|
|
|
|
.grid8 > *,
|
|
|
|
.grid10 > *,
|
2014-05-07 10:45:47 +02:00
|
|
|
.grid12 > * {
|
|
|
|
width: 33.333%;
|
|
|
|
}
|
2013-09-12 11:59:14 +02:00
|
|
|
}
|
2014-04-20 19:52:20 +02:00
|
|
|
@media (max-width: @small-screen) {
|
2013-09-12 11:59:14 +02:00
|
|
|
.grid3 > *,
|
|
|
|
.grid4 > *,
|
|
|
|
.grid5 > *,
|
|
|
|
.grid6 > *,
|
|
|
|
.grid8 > *,
|
|
|
|
.grid10 > *,
|
2014-05-07 10:45:47 +02:00
|
|
|
.grid12 > * {
|
|
|
|
width: 50%;
|
|
|
|
}
|
2013-09-12 11:59:14 +02:00
|
|
|
}
|
2014-04-20 19:52:20 +02:00
|
|
|
@media (max-width: @tiny-screen) {
|
2014-05-07 10:45:47 +02:00
|
|
|
.grid > * > * {
|
|
|
|
width: 100% !important;
|
|
|
|
}
|
2014-02-01 18:37:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ---------------------------------- */
|
|
|
|
/* ==autogrids */
|
|
|
|
/* .. to automatically justify blocs */
|
|
|
|
/* ---------------------------------- */
|
|
|
|
|
|
|
|
/* Demo : http://codepen.io/raphaelgoetter/pen/Kqehf */
|
|
|
|
|
2014-05-07 10:45:47 +02:00
|
|
|
/* container of autogrids */
|
|
|
|
[class*="autogrid"] {
|
2014-02-01 18:37:56 +01:00
|
|
|
text-align: justify;
|
|
|
|
}
|
2014-05-07 10:45:47 +02:00
|
|
|
|
2014-02-01 18:37:56 +01:00
|
|
|
[class*="autogrid"]:after {
|
|
|
|
content: "";
|
|
|
|
display: inline-block;
|
|
|
|
width: 100%;
|
|
|
|
}
|
2014-05-07 10:45:47 +02:00
|
|
|
|
2014-02-01 18:37:56 +01:00
|
|
|
[class*="autogrid"] > * {
|
|
|
|
display: inline-block;
|
|
|
|
vertical-align: top;
|
2014-04-20 19:54:11 +02:00
|
|
|
text-align: left;
|
2014-05-03 11:08:29 +02:00
|
|
|
}
|
2014-05-07 10:45:47 +02:00
|
|
|
|
2014-05-03 11:08:29 +02:00
|
|
|
/* whitespace fixing for modern browsers including IE9+ */
|
2014-05-09 10:54:30 +02:00
|
|
|
/* 1- fallback for IE9+ */
|
|
|
|
/* 2- fallback for Opera Mini */
|
2014-05-03 11:08:29 +02:00
|
|
|
:root [class*="autogrid"] {
|
|
|
|
font-size: 0;
|
2014-05-09 10:54:30 +02:00
|
|
|
text-justify: distribute-all-lines; /* 1 */
|
2014-05-03 11:08:29 +02:00
|
|
|
}
|
2014-05-07 10:45:47 +02:00
|
|
|
|
2014-05-03 14:56:09 +02:00
|
|
|
:root [class*="autogrid"] > * {
|
2014-05-09 10:54:30 +02:00
|
|
|
font-size: @base-font-size; /* 2 */
|
2014-05-04 15:30:21 +02:00
|
|
|
font-size: unit((@base-font-size / 10), rem);
|
2014-05-03 11:08:29 +02:00
|
|
|
}
|
2014-05-07 10:45:47 +02:00
|
|
|
|
2014-05-03 11:08:29 +02:00
|
|
|
/* Opera hack */
|
|
|
|
[class*="autogrid"]:-o-prefocus {
|
|
|
|
word-spacing: -0.43em;
|
2014-02-01 18:37:56 +01:00
|
|
|
}
|
2014-05-07 10:45:47 +02:00
|
|
|
|
|
|
|
.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%;
|
|
|
|
}
|
2014-02-01 18:37:56 +01:00
|
|
|
|
2014-04-20 19:52:20 +02:00
|
|
|
@media (max-width: @large-screen) {
|
2014-02-01 18:37:56 +01:00
|
|
|
.autogrid5 > *,
|
|
|
|
.autogrid6 > *,
|
|
|
|
.autogrid8 > *,
|
|
|
|
.autogrid10 > *,
|
2014-05-07 10:45:47 +02:00
|
|
|
.autogrid12 > * {
|
|
|
|
width: 32%;
|
|
|
|
}
|
2014-02-01 18:37:56 +01:00
|
|
|
}
|
|
|
|
|
2014-04-20 19:52:20 +02:00
|
|
|
@media (max-width: @small-screen) {
|
2014-02-01 18:37:56 +01:00
|
|
|
.autogrid5 > *,
|
|
|
|
.autogrid6 > *,
|
|
|
|
.autogrid8 > *,
|
|
|
|
.autogrid10 > *,
|
2014-05-07 10:45:47 +02:00
|
|
|
.autogrid12 > * {
|
|
|
|
width: 49%;
|
|
|
|
}
|
2014-02-01 18:37:56 +01:00
|
|
|
}
|
|
|
|
|
2014-04-20 19:52:20 +02:00
|
|
|
@media (max-width: @tiny-screen) {
|
2014-05-07 10:45:47 +02:00
|
|
|
[class*="autogrid"] > * {
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
}
|