KNACSS/css/knacss.css

462 lines
8.3 KiB
CSS
Raw Normal View History

/*!
* www.KNACSS.com V2.9 (2013-10) @author: Raphael Goetter, Alsacreations
* Licence WTFPL http://www.wtfpl.net/
2013-03-31 10:19:51 +02:00
*/
/* ----------------------------- */
2013-08-01 08:56:52 +02:00
/* ==reset */
2013-03-31 10:19:51 +02:00
/* ----------------------------- */
/* base font-size corresponds to 10px and is adapted to rem unit */
html {
font-size: 62.5%;
}
body {
background-color: #fff;
color: #000;
font-family: helvetica, arial, sans-serif;
2013-03-31 10:19:51 +02:00
font-size: 1.4em; /* equiv 14px */
line-height: 1.5; /* adapt to your design */
}
/* font-sizing for content */
/* preserves vertical-rythm, thanks to http://soqr.fr/vertical-rhythm/ */
2013-03-31 10:19:51 +02:00
p,
ul,
ol,
dl,
blockquote,
pre,
td,
th,
label,
textarea,
caption,
details,
figure {
2013-03-31 10:19:51 +02:00
margin: .75em 0 0;
2013-09-16 21:21:06 +02:00
line-height: 1.5;
2013-03-31 10:19:51 +02:00
}
h1, .h1-like {
2013-09-16 21:21:06 +02:00
margin: 0.6563em 0 0 0;
font-size: 2.2857em; /* equiv 32px */
line-height: 1.3126;
2013-03-31 10:19:51 +02:00
}
h2, .h2-like {
2013-09-16 21:21:06 +02:00
margin: 0.75em 0 0 0;
font-size: 2em; /* equiv 28px */
line-height: 1.5;
2013-03-31 10:19:51 +02:00
}
h3, .h3-like {
2013-09-16 21:21:06 +02:00
margin: 0.875em 0 0 0;
font-size: 1.7143em; /* equiv 24px */
line-height: 1.75;
2013-03-31 10:19:51 +02:00
}
h4, .h4-like {
2013-09-16 21:21:06 +02:00
margin: 1.05em 0 0 0;
2013-03-31 10:19:51 +02:00
font-size: 1.4286em; /* equiv 20px */
line-height: 1.05;
2013-03-31 10:19:51 +02:00
}
h5, .h5-like {
2013-09-16 21:21:06 +02:00
margin: 1.1667em 0 0 0;
2013-03-31 10:19:51 +02:00
font-size: 1.2857em; /* equiv 18px */
line-height: 1.1667;
2013-03-31 10:19:51 +02:00
}
h6, .h6-like {
2013-09-16 21:21:06 +02:00
margin: 1.3125em 0 0 0;
2013-03-31 10:19:51 +02:00
font-size: 1.1429em; /* equiv 16px */
line-height: 1.3125;
2013-03-31 10:19:51 +02:00
}
/* alternate font-sizing */
.smaller {
font-size: .7143em; /* equiv 10px */
}
.small {
font-size: .8571em; /* equiv 12px */
}
.big {
font-size: 1.1429em; /* equiv 16px */
}
.bigger {
font-size: 1.2857em; /* equiv 18px */
}
.biggest {
font-size: 1.4286em; /* equiv 20px */
}
/* soft reset */
html,
body {
2013-03-31 10:19:51 +02:00
margin: 0;
padding: 0;
}
ul,
ol {
padding-left: 2em;
}
2013-04-07 11:33:23 +02:00
ul.unstyled {
list-style: none;
}
2013-03-31 10:19:51 +02:00
code,
pre,
samp,
kbd {
white-space: pre-wrap;
font-family: consolas, 'DejaVu Sans Mono', courier, monospace;
line-height: 1em;
}
code, kbd, mark {
border-radius: 2px;
}
em {
font-style: italic;
}
strong {
font-weight: bold;
}
kbd {
padding: 0 2px;
border: 1px solid #999;
}
code {
padding: 2px 4px;
background: rgba(0,0,0,.04);
color: #b11;
}
mark {
padding:2px 4px;
background: #ff0;
}
sup,
sub {
2013-05-13 18:39:30 +02:00
vertical-align: 0;
position: relative;
}
sup {
2013-05-13 18:39:30 +02:00
bottom: 1ex;
}
sub {
2013-05-13 18:39:30 +02:00
top: .5ex;
}
2013-03-31 10:19:51 +02:00
table { margin-bottom: 1.5em; }
/* avoid top margins on first content element */
2013-08-13 07:51:27 +02:00
p:first-child,
2013-03-31 10:19:51 +02:00
ul:first-child,
ol:first-child,
dl:first-child,
blockquote:first-child,
pre:first-child,
h1:first-child,
h2:first-child,
h3:first-child,
h4:first-child,
h5:first-child,
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%;
}
/* pictures */
img {
vertical-align: middle;
}
/* Google Gmap3 bug fix on images */
:not(.gm-style) img {
2013-10-21 09:54:59 +02:00
height: auto !important;
}
.ie678 .gm-style img {
height: 100%; /* IE678 hack */
}
2013-09-09 14:38:36 +02:00
.gm-style img,
2013-07-29 11:54:20 +02:00
.gmnoscreen img,
.gmnoprint img {
max-width: none !important;
}
2013-03-31 10:19:51 +02:00
a img { border: 0; }
/* scripts */
body > script {display: none !important;}
/* skip-links */
.skip-links {
position: absolute;
}
.skip-links a {
position: absolute;
left: -7000px;
padding: 0.5em;
background: #000;
color:#fff;
text-decoration: none;
}
.skip-links a:focus {
position: static;
}
/* ----------------------------- */
2013-08-01 08:56:52 +02:00
/* ==layout and modules */
2013-03-31 10:19:51 +02:00
/* ----------------------------- */
/* switching box model for all elements */
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
2013-03-31 10:19:51 +02:00
}
/* float layout */
2013-08-01 08:56:52 +02:00
/* module, gains superpower "BFC" Block Formating Context */
.mod {
2013-03-31 10:19:51 +02:00
overflow: hidden;
}
/* blocks that needs to be placed under floats */
.clear,
.line,
.row {
clear: both;
}
/* blocks that must contain floats */
.clearfix:after,
.line:after,
.mod: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 elements */
.left {
float: left;
}
img.left {
margin-right: 1em;
}
/* right elements */
.right {
float: right;
}
img.right {
margin-left: 1em;
}
img.left, img.right {
margin-bottom: 5px;
}
.center { margin-left: auto; margin-right: auto; }
.txtleft { text-align: left; }
.txtright { text-align: right; }
.txtcenter { text-align: center; }
/* blocks widths (percentages and pixels) */
2013-03-31 10:19:51 +02:00
.w10 { width: 10%; }
.w20 { width: 20%; }
.w25 { width: 25%; }
.w30 { width: 30%; }
2013-08-01 08:56:52 +02:00
.w33 { width: 33.3333%; }
2013-03-31 10:19:51 +02:00
.w40 { width: 40%; }
.w50 { width: 50%; }
.w60 { width: 60%; }
2013-08-01 08:56:52 +02:00
.w66 { width: 66.6666%; }
2013-03-31 10:19:51 +02:00
.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; }
2013-05-27 18:43:25 +02:00
.w1140p { width: 1140px; }
.mw1140p { max-width: 1140px; }
2013-03-31 10:19:51 +02:00
/* spacing helpers
p,m = padding,margin
a,t,r,b,l = all,top,right,bottom,left
s,m,l,n,0 = small(10px),medium(20px),large(30px), zero or none(0)
2013-03-31 10:19:51 +02:00
source https://github.com/stubbornella/oocss/blob/master/core/spacing/space.css
*/
.m-reset, .ma0 { margin: 0; }
.p-reset, .pa0 { padding: 0; }
.ma1, .mas { margin: 10px; }
.ma2, .mam { margin: 20px; }
.ma3, .mal { margin: 30px; }
2013-03-31 10:19:51 +02:00
.pa1, .pas { padding: 10px; }
.pa2, .pam { padding: 20px; }
.pa3, .pal { padding: 30px; }
.mt0, .mtn { margin-top: 0; }
.mt1, .mts { margin-top: 10px; }
.mt2, .mtm { margin-top: 20px; }
.mt3, .mtl { margin-top: 30px; }
2013-03-31 10:19:51 +02:00
.mr0, .mrn { margin-right: 0; }
.mr1, .mrs { margin-right: 10px; }
.mr2, .mrm { margin-right: 20px; }
.mr3, .mrl { margin-right: 30px; }
.mb0, .mbn { margin-bottom: 0; }
.mb1, .mbs { margin-bottom: 10px; }
.mb2, .mbm { margin-bottom: 20px; }
.mb3, .mbl { margin-bottom: 30px; }
2013-03-31 10:19:51 +02:00
.ml0, .mln { margin-left: 0; }
.ml1, .mls { margin-left: 10px; }
.ml2, .mlm { margin-left: 20px; }
.ml3, .mll { margin-left: 30px; }
.pt0, .ptn { padding-top: 0; }
.pt1, .pts { padding-top: 10px; }
.pt2, .ptm { padding-top: 20px; }
.pt3, .ptl { padding-top: 30px; }
.pr0, .prn { padding-right: 0; }
.pr1, .prs { padding-right: 10px; }
.pr2, .prm { padding-right: 20px; }
.pr3, .prl { padding-right: 30px; }
.pb0, .pbn { padding-bottom: 0; }
.pb1, .pbs { padding-bottom: 10px; }
.pb2, .pbm { padding-bottom: 20px; }
.pb3, .pbl { padding-bottom: 30px; }
.pl0, .pln { padding-left: 0; }
.pl1, .pls { padding-left: 10px; }
.pl2, .plm { padding-left: 20px; }
.pl3, .pll { padding-left: 30px; }
/* hiding content */
.visually-hidden {
position: absolute;
left: -7000px;
overflow: hidden;
}
[dir=rtl] .visually-hidden {
left: auto;
right: -7000px;
}
.desktop-hidden { display: none; } /* hidden on desktop */
/* ----------------------------- */
2013-08-01 08:56:52 +02:00
/* ==iefix */
2013-03-31 10:19:51 +02:00
/* ----------------------------- */
/* hasLayout for IE6/IE7 */
2013-03-31 10:19:51 +02:00
.ie67 .clearfix,
.ie67 .line,
.ie67 .mod,
.ie67 .row,
.ie67 .col {
zoom: 1;
}
/* inline-block and table-cell for IE6/IE7 */
/* warning: .col needs a width on IE6/IE7 */
2013-03-31 10:19:51 +02:00
.ie67 .btn,
.ie67 .col,
.ie67 .inbl {
display: inline;
zoom: 1;
}
.ie8 img {
width: auto; /* @bugfix for IE8 */
}
/* Active box-sizing for IE6/IE7 */
/* @source https://github.com/Schepp/box-sizing-polyfill */
/*
.ie67 * {
behavior: url(/js/boxsizing.htc);
}
*/
/* ----------------------------- */
2013-08-01 08:56:52 +02:00
/* ==print */
2013-03-31 10:19:51 +02:00
/* ----------------------------- */
/* 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;
}
}
2013-09-09 21:33:32 +02:00
/* debug helper */
.knacss-debug {
background: pink;
outline: 3px solid maroon;
}
2013-03-31 10:19:51 +02:00
/* orientation iOS font-size fix */
@media (orientation: landscape) and (max-device-width: 768px) {
html,
body {
-webkit-text-size-adjust: 100%;
}
2013-08-01 09:03:28 +02:00
}
/* ----------------------------- */
/* ==own stylesheet */
/* ----------------------------- */
/* Here should go your own CSS styles */
/* You can link them with an @import or, better for webperf, just paste them here */
/* @import url(my-styles.css); */