Experimental "future-proof" version of KNACSS
This commit is contained in:
parent
3fa53f9083
commit
f42ad600be
18 changed files with 3777 additions and 0 deletions
637
future-proof/css-includes/01-base.css
Normal file
637
future-proof/css-includes/01-base.css
Normal file
|
@ -0,0 +1,637 @@
|
|||
/*!
|
||||
* www.KNACSS.com V3.0.3 (2014-05-21) @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 {
|
||||
height: auto;
|
||||
vertical-align: middle;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
audio,
|
||||
canvas,
|
||||
video {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ----------------------------- */
|
||||
/* == typography */
|
||||
/* ----------------------------- */
|
||||
|
||||
|
||||
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%;
|
||||
}
|
||||
|
||||
body {
|
||||
|
||||
/* set body font-size in em (1.4em equiv "14px") */
|
||||
font-size: calc(var(--base-font-size) * 0.1em);
|
||||
|
||||
background-color: var(--base-background);
|
||||
color: var(--base-color);
|
||||
font-family: var(--font-stack-common);
|
||||
line-height: var(--line-height);
|
||||
}
|
||||
|
||||
/* font-sizing for content */
|
||||
p,
|
||||
.p-like,
|
||||
ul,
|
||||
ol,
|
||||
dl,
|
||||
blockquote,
|
||||
pre,
|
||||
td,
|
||||
th,
|
||||
label,
|
||||
textarea,
|
||||
caption,
|
||||
details,
|
||||
figure {
|
||||
margin-top: 0.75em;
|
||||
margin-bottom: 0;
|
||||
line-height: var(--line-height);
|
||||
}
|
||||
|
||||
h1,
|
||||
.h1-like {
|
||||
font-size: var(--h1-size);
|
||||
}
|
||||
|
||||
h2,
|
||||
.h2-like {
|
||||
font-size: var(--h2-size);
|
||||
}
|
||||
|
||||
h3,
|
||||
.h3-like {
|
||||
font-size: var(--h3-size);
|
||||
}
|
||||
|
||||
h4,
|
||||
.h4-like {
|
||||
font-size: var(--h4-size);
|
||||
}
|
||||
|
||||
h5,
|
||||
.h5-like {
|
||||
font-size: var(--h5-size);
|
||||
}
|
||||
|
||||
h6,
|
||||
.h6-like {
|
||||
font-size: var(--h6-size);
|
||||
}
|
||||
|
||||
/* alternate font-sizing */
|
||||
.smaller {
|
||||
font-size: 0.7em;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.big {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.bigger {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
.biggest {
|
||||
font-size: 1.6em;
|
||||
}
|
||||
|
||||
code,
|
||||
pre,
|
||||
samp,
|
||||
kbd {
|
||||
/* IE fix */
|
||||
white-space: pre-line;
|
||||
white-space: pre-wrap;
|
||||
font-family: var(--font-stack-monospace);
|
||||
line-height: normal;
|
||||
}
|
||||
em,
|
||||
.em,
|
||||
address,
|
||||
cite,
|
||||
dfn,
|
||||
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 */
|
||||
/* ----------------------------- */
|
||||
|
||||
/* hidden but not for assistance tools, Yahoo! method */
|
||||
.visually-hidden {
|
||||
position: absolute !important;
|
||||
border: 0 !important;
|
||||
height: 1px !important;
|
||||
width: 1px !important;
|
||||
padding: 0 !important;
|
||||
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 */
|
||||
/* ----------------------------- */
|
||||
|
||||
/* avoid top margins on first content element */
|
||||
p:first-child,
|
||||
.p-like:first-child,
|
||||
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 .p-like,
|
||||
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: var(--medium-value);
|
||||
}
|
||||
|
||||
/* ----------------------------- */
|
||||
/* ==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: var(--small-value);
|
||||
}
|
||||
|
||||
/* right (or ending) elements */
|
||||
.right,
|
||||
.end {
|
||||
float: right;
|
||||
}
|
||||
|
||||
img.right,
|
||||
img.end {
|
||||
margin-left: var(--small-value);
|
||||
}
|
||||
|
||||
img.left,
|
||||
img.right,
|
||||
img.start,
|
||||
img.end {
|
||||
margin-bottom: var(--tiny-value);
|
||||
}
|
||||
|
||||
.center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.txtleft {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.txtright {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.txtcenter {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 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
|
||||
p,m = padding,margin
|
||||
a,t,r,b,l = all,top,right,bottom,left
|
||||
s,m,l,n = small, medium, large, none
|
||||
*/
|
||||
.man {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.pan {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.mas {
|
||||
margin: var(--small-value);
|
||||
}
|
||||
|
||||
.mam {
|
||||
margin: var(--medium-value);
|
||||
}
|
||||
|
||||
.mal {
|
||||
margin: var(--large-value);
|
||||
}
|
||||
|
||||
.pas {
|
||||
padding: var(--small-value);
|
||||
}
|
||||
|
||||
.pam {
|
||||
padding: var(--medium-value);
|
||||
}
|
||||
|
||||
.pal {
|
||||
padding: var(--large-value);
|
||||
}
|
||||
|
||||
.mtn {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.mts {
|
||||
margin-top: var(--small-value);
|
||||
}
|
||||
|
||||
.mtm {
|
||||
margin-top: var(--medium-value);
|
||||
}
|
||||
|
||||
.mtl {
|
||||
margin-top: var(--large-value);
|
||||
}
|
||||
|
||||
.mrn {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.mrs {
|
||||
margin-right: var(--small-value);
|
||||
}
|
||||
|
||||
.mrm {
|
||||
margin-right: var(--medium-value);
|
||||
}
|
||||
|
||||
.mrl {
|
||||
margin-right: var(--large-value);
|
||||
}
|
||||
|
||||
.mbn {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.mbs {
|
||||
margin-bottom: var(--small-value);
|
||||
}
|
||||
|
||||
.mbm {
|
||||
margin-bottom: var(--medium-value);
|
||||
}
|
||||
|
||||
.mbl {
|
||||
margin-bottom: var(--large-value);
|
||||
}
|
||||
|
||||
.mln {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.mls {
|
||||
margin-left: var(--small-value);
|
||||
}
|
||||
|
||||
.mlm {
|
||||
margin-left: var(--medium-value);
|
||||
}
|
||||
|
||||
.mll {
|
||||
margin-left: var(--large-value);
|
||||
}
|
||||
|
||||
.ptn {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.pts {
|
||||
padding-top: var(--small-value);
|
||||
}
|
||||
|
||||
.ptm {
|
||||
padding-top: var(--medium-value);
|
||||
}
|
||||
|
||||
.ptl {
|
||||
padding-top: var(--large-value);
|
||||
}
|
||||
|
||||
.prn {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.prs {
|
||||
padding-right: var(--small-value);
|
||||
}
|
||||
|
||||
.prm {
|
||||
padding-right: var(--medium-value);
|
||||
}
|
||||
|
||||
.prl {
|
||||
padding-right: var(--large-value);
|
||||
}
|
||||
|
||||
.pbn {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.pbs {
|
||||
padding-bottom: var(--small-value);
|
||||
}
|
||||
|
||||
.pbm {
|
||||
padding-bottom: var(--medium-value);
|
||||
}
|
||||
|
||||
.pbl {
|
||||
padding-bottom: var(--large-value);
|
||||
}
|
||||
|
||||
.pln {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.pls {
|
||||
padding-left: var(--small-value);
|
||||
}
|
||||
|
||||
.plm {
|
||||
padding-left: var(--medium-value);
|
||||
}
|
||||
|
||||
.pll {
|
||||
padding-left: var(--large-value);
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue