First commit.
This commit is contained in:
commit
b7977e1c28
2 changed files with 28081 additions and 0 deletions
31
sass/layouts/layout-swap/_layout-swap.scss
Normal file
31
sass/layouts/layout-swap/_layout-swap.scss
Normal 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%;
|
||||
}
|
||||
}
|
||||
}
|
||||
4
sass/layouts/layout-swap/layout-swap.twig
Normal file
4
sass/layouts/layout-swap/layout-swap.twig
Normal 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>
|
||||
Loading…
Reference in a new issue