380 lines
7 KiB
Text
380 lines
7 KiB
Text
@import "00-config";
|
|
/*!
|
|
* www.KNACSS.com V2.9.4 (2014-04) @author: Raphael Goetter, Alsacreations
|
|
* Licence WTFPL http://www.wtfpl.net/
|
|
*/
|
|
|
|
/* ----------------------------- */
|
|
/* == soft reset */
|
|
/* ----------------------------- */
|
|
|
|
/* switching box model for all elements */
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* soft reset */
|
|
html,
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
ul,
|
|
ol {
|
|
padding-left: 2em;
|
|
}
|
|
ul.unstyled {
|
|
list-style: none;
|
|
}
|
|
img {
|
|
vertical-align: middle;
|
|
border: 0;
|
|
}
|
|
audio,
|
|
canvas,
|
|
video {
|
|
display: inline-block;
|
|
}
|
|
svg:not(:root) {
|
|
overflow: hidden;
|
|
}
|
|
figure {
|
|
margin: 0;
|
|
}
|
|
|
|
|
|
/* ----------------------------- */
|
|
/* == typography */
|
|
/* ----------------------------- */
|
|
|
|
/* base font-size corresponds to 10px and is adapted to rem unit */
|
|
html {
|
|
font-size: 62.5%;
|
|
-webkit-text-size-adjust: 100%;
|
|
-ms-text-size-adjust: 100%;
|
|
}
|
|
body {
|
|
background-color: @basebg;
|
|
color: @basecolor;
|
|
font-family: @fontstack1;
|
|
font-size: unit((@basefont / 10), em);
|
|
line-height: @lh; // adapt to your design
|
|
}
|
|
|
|
/* font-sizing for content */
|
|
/* preserve vertical-rythm, thanks to http://soqr.fr/vertical-rhythm/ */
|
|
p,
|
|
ul,
|
|
ol,
|
|
dl,
|
|
blockquote,
|
|
pre,
|
|
td,
|
|
th,
|
|
label,
|
|
textarea,
|
|
caption,
|
|
details,
|
|
figure,
|
|
hgroup {
|
|
margin-top: .75em;
|
|
margin-bottom: 0;
|
|
line-height: @lh;
|
|
}
|
|
h1, .h1-like {
|
|
.flow(@h1-size);
|
|
}
|
|
h2, .h2-like {
|
|
.flow(@h2-size);
|
|
}
|
|
h3, .h3-like {
|
|
.flow(@h3-size);
|
|
}
|
|
h4, .h4-like {
|
|
.flow(@h4-size);
|
|
}
|
|
h5, .h5-like {
|
|
.flow(@h5-size);
|
|
}
|
|
h6, .h6-like {
|
|
.flow(@h6-size);
|
|
}
|
|
|
|
/* alternate font-sizing */
|
|
.smaller {
|
|
.em(@basefont - 4);
|
|
}
|
|
.small {
|
|
.em(@basefont - 2);
|
|
}
|
|
.big {
|
|
.em(@basefont + 2);
|
|
}
|
|
.bigger {
|
|
.em(@basefont + 4);
|
|
}
|
|
.biggest {
|
|
.em(@basefont + 6);
|
|
}
|
|
|
|
code,
|
|
pre,
|
|
samp,
|
|
kbd {
|
|
white-space: pre-line; /* IE fix */
|
|
white-space: pre-wrap;
|
|
font-family: @fontstack2;
|
|
line-height: normal;
|
|
}
|
|
em {
|
|
font-style: italic;
|
|
}
|
|
strong {
|
|
font-weight: bold;
|
|
}
|
|
|
|
/* ----------------------------- */
|
|
/* == hiding content */
|
|
/* ----------------------------- */
|
|
|
|
/* hiding content */
|
|
.visually-hidden {
|
|
position: absolute !important;
|
|
clip: rect(1px, 1px, 1px, 1px);
|
|
overflow: hidden;
|
|
height: 1px; width: 1px;
|
|
}
|
|
|
|
/* ----------------------------- */
|
|
/* == browsers consistency */
|
|
/* ----------------------------- */
|
|
|
|
/* avoid top margins on first content element */
|
|
p, ul, ol, dl,
|
|
blockquote, pre,
|
|
h1, h2, h3, h4, h5, h6 {
|
|
&:first-child {
|
|
margin-top: 0;
|
|
}
|
|
}
|
|
|
|
/* avoid margins on nested elements */
|
|
li p,
|
|
li ul,
|
|
li ol {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/* max values */
|
|
img, table, td, blockquote, code, pre, textarea, input, video {
|
|
max-width: 100%;
|
|
}
|
|
|
|
/* margin-bottom on tables */
|
|
table { margin-bottom: 1.5em; }
|
|
|
|
/* Google Gmap3 bug fix on images */
|
|
:not(.gm-style) img {
|
|
height: auto;
|
|
}
|
|
.gm-style img,
|
|
.gmnoscreen img,
|
|
.gmnoprint img {
|
|
max-width: none !important;
|
|
}
|
|
|
|
/* scripts */
|
|
body > script {display: none !important;}
|
|
|
|
|
|
/* ----------------------------- */
|
|
/* ==layout and modules */
|
|
/* ----------------------------- */
|
|
|
|
/* float layout */
|
|
/* module, gains superpower "BFC" Block Formating Context */
|
|
.mod {
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* blocks that needs to be placed under floats */
|
|
.clear,
|
|
.line,
|
|
.row {
|
|
clear: both;
|
|
}
|
|
|
|
/* blocks that must contain floats */
|
|
.clearfix:after,
|
|
.line:after {
|
|
content: "";
|
|
display: table;
|
|
clear: both;
|
|
}
|
|
|
|
/* table layout */
|
|
.row {
|
|
display: 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) */
|
|
/* ------------------------------ */
|
|
|
|
/* left (or starting) elements */
|
|
.left,
|
|
.start {
|
|
float: left;
|
|
}
|
|
img.left,
|
|
img.start {
|
|
margin-right: @small-value;
|
|
}
|
|
/* right (or ending) elements */
|
|
.right,
|
|
.end {
|
|
float: right;
|
|
}
|
|
img.right,
|
|
img.end {
|
|
margin-left: @small-value;
|
|
}
|
|
img.left, img.right,
|
|
img.start, img.end {
|
|
margin-bottom: @tiny-value;
|
|
}
|
|
.center { margin-left: auto; margin-right: auto; }
|
|
.txtleft { text-align: left; }
|
|
.txtright { text-align: right; }
|
|
.txtcenter { text-align: center; }
|
|
|
|
|
|
// width helpers boolean
|
|
& when (@helpers-width = true) {
|
|
/* blocks widths (percentage and pixels) */
|
|
.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; }
|
|
}
|
|
|
|
|
|
// spacing helpers boolean
|
|
& when (@helpers-spacing = true) {
|
|
/* spacing helpers
|
|
p,m = padding,margin
|
|
a,t,r,b,l = all,top,right,bottom,left
|
|
s,m,l,n = small, medium, large, none
|
|
*/
|
|
.m-reset, .ma0 { margin: 0; }
|
|
.p-reset, .pa0 { padding: 0; }
|
|
.ma1, .mas { margin: @small-value; }
|
|
.ma2, .mam { margin: @medium-value; }
|
|
.ma3, .mal { margin: @large-value; }
|
|
.pa1, .pas { padding: @small-value; }
|
|
.pa2, .pam { padding: @medium-value; }
|
|
.pa3, .pal { padding: @large-value; }
|
|
|
|
.mt0, .mtn { margin-top: 0; }
|
|
.mt1, .mts { margin-top: @small-value; }
|
|
.mt2, .mtm { margin-top: @medium-value; }
|
|
.mt3, .mtl { margin-top: @large-value; }
|
|
.mr0, .mrn { margin-right: 0; }
|
|
.mr1, .mrs { margin-right: @small-value; }
|
|
.mr2, .mrm { margin-right: @medium-value; }
|
|
.mr3, .mrl { margin-right: @large-value; }
|
|
.mb0, .mbn { margin-bottom: 0; }
|
|
.mb1, .mbs { margin-bottom: @small-value; }
|
|
.mb2, .mbm { margin-bottom: @medium-value; }
|
|
.mb3, .mbl { margin-bottom: @large-value; }
|
|
.ml0, .mln { margin-left: 0; }
|
|
.ml1, .mls { margin-left: @small-value; }
|
|
.ml2, .mlm { margin-left: @medium-value; }
|
|
.ml3, .mll { margin-left: @large-value; }
|
|
|
|
.pt0, .ptn { padding-top: 0; }
|
|
.pt1, .pts { padding-top: @small-value; }
|
|
.pt2, .ptm { padding-top: @medium-value; }
|
|
.pt3, .ptl { padding-top: @large-value; }
|
|
.pr0, .prn { padding-right: 0; }
|
|
.pr1, .prs { padding-right: @small-value; }
|
|
.pr2, .prm { padding-right: @medium-value; }
|
|
.pr3, .prl { padding-right: @large-value; }
|
|
.pb0, .pbn { padding-bottom: 0; }
|
|
.pb1, .pbs { padding-bottom: @small-value; }
|
|
.pb2, .pbm { padding-bottom: @medium-value; }
|
|
.pb3, .pbl { padding-bottom: @large-value; }
|
|
.pl0, .pln { padding-left: 0; }
|
|
.pl1, .pls { padding-left: @small-value; }
|
|
.pl2, .plm { padding-left: @medium-value; }
|
|
.pl3, .pll { padding-left: @large-value; }
|
|
}
|
|
|
|
/* ----------------------------- */
|
|
/* == quick print reset */
|
|
/* ----------------------------- */
|
|
|
|
@media print {
|
|
p,
|
|
blockquote {
|
|
orphans: 2;
|
|
widows: 2;
|
|
}
|
|
blockquote,
|
|
ul,
|
|
ol {
|
|
page-break-inside: avoid;
|
|
}
|
|
h1,
|
|
h2,
|
|
h3,
|
|
caption {
|
|
page-break-after: avoid;
|
|
}
|
|
}
|
|
|
|
/* debug helper */
|
|
.knacss-debug {
|
|
background: pink;
|
|
outline: 3px solid maroon;
|
|
}
|