KNACSS/sass/components/autogrid.scss

29 lines
568 B
SCSS
Raw Normal View History

2017-07-31 10:52:40 +02:00
/* ----------------------------- */
/* ==Autogrid object */
/* ----------------------------- */
/* see http://codepen.io/raphaelgoetter/pen/KMgBJd */
2017-07-31 10:52:40 +02:00
2017-06-21 10:50:33 +02:00
@media (min-width: $small) {
2016-09-21 10:26:28 +02:00
[class^="autogrid"],
[class*=" autogrid"] {
display: flex;
}
2016-09-21 10:26:28 +02:00
[class^="autogrid"] > *,
[class*=" autogrid"] > * {
flex: 1;
min-width: 0; /* avoid min-width:auto */
}
}
/* Autogrid variants */
2017-06-21 10:50:33 +02:00
@media (min-width: $small) {
2016-09-21 10:26:28 +02:00
.has-gutter > *:not(:first-child) {
margin-left: 1rem;
}
2016-09-21 10:26:28 +02:00
[class*="--reverse"] {
2016-09-27 16:10:21 +02:00
flex-direction: row-reverse;
2016-09-21 10:26:28 +02:00
}
}