KNACSS/less/_02-layout.less

131 lines
1.6 KiB
Text
Raw Normal View History

/* ----------------------------- */
/* ==layout and modules */
/* ----------------------------- */
/* 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,
.line {
&:after {
content: "";
display: table;
clear: both;
border-collapse: collapse;
}
}
/* simple blocks alignment */
.left {
margin-right: auto;
}
.right {
margin-left: auto;
}
.center {
margin-left: auto;
margin-right: auto;
}
/* text and contents alignment */
.txtleft {
text-align: left;
}
.txtright {
text-align: right;
}
.txtcenter {
text-align: center;
}
/* floating elements */
.fl {
float: left;
}
img.fl {
margin-right: @small-value;
}
.fr {
float: right;
}
img.fr {
margin-left: @small-value;
}
img.fl,
img.fr {
margin-bottom: @tiny-value;
}
/* table layout */
.row {
display: table;
table-layout: fixed;
width: 100%;
}
.row > *,
.col {
display: table-cell;
vertical-align: top;
}
/* no table-cell for script tag when body is a .row */
body > script {
display: none !important;
}
/* inline-block */
.inbl {
display: inline-block;
vertical-align: top;
}
/* flexbox layout
http://www.alsacreations.com/tuto/lire/1493-css3-flexbox-layout-module.html
*/
.flexbox,
.flexbox-v {
2013-09-12 11:59:14 +02:00
display : flex;
flex-wrap: wrap;
flex-direction: column;
2013-09-12 11:59:14 +02:00
}
2014-05-07 10:45:47 +02:00
.flexbox-h {
2013-09-12 11:59:14 +02:00
flex-direction: row;
}
2014-05-07 10:45:47 +02:00
.flexitem-fluid {
2013-09-12 11:59:14 +02:00
flex: 1;
}
2014-05-07 10:45:47 +02:00
.flexitem-first {
2013-09-12 11:59:14 +02:00
order : -1;
}
2014-05-07 10:45:47 +02:00
.flexitem-medium {
order : 0;
2013-09-12 11:59:14 +02:00
}
2014-05-07 10:45:47 +02:00
.flexitem-last {
order : 1;
2014-05-07 10:45:47 +02:00
}