First commit.

This commit is contained in:
Fredrik Jonsson 2017-03-09 14:26:46 +01:00
commit b7977e1c28
2 changed files with 28081 additions and 0 deletions

View file

@ -0,0 +1,31 @@
// The height of the navigation container.
$layout-swap-height: 2 * $base-line-height;
// Layout swap
//
// Uses absolute positioning and selective padding to make 2 elements appear to
// swap places in the visual order while maintaining their original HTML source
// order.
//
// Markup: layout-swap.twig
//
// Style guide: layouts.layout-swap
.layout-swap,
%layout-swap {
position: relative;
@include respond-to(xs) {
// Move all the children down to make room for the "top" element.
padding-top: $layout-swap-height;
}
&__top {
@include respond-to(xs) {
position: absolute;
top: 0;
height: $layout-swap-height;
width: 100%;
}
}
}

View file

@ -0,0 +1,4 @@
<div class="layout-swap">
<div>This element comes <strong>first</strong> in the HTML source order.</div>
<div class="layout-swap__top">This element comes <strong>second</strong> in the HTML source order.</div>
</div>