This repository has been archived by the owner on Oct 6, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
_l-container.scss
106 lines (80 loc) · 2.33 KB
/
_l-container.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/* ============================================================================
@LAYOUT -> CONTAINER
========================================================================= */
/**
* The main container that wraps all major layout pieces so that we keep all
* layout consistent. The container is responsive in that it will be a fluid
* width using '%' up until it hits it's maximum width. And it's center
* aligned by default.
*
* @markup
<div class="l-container [modifier(s)]"> [...] </div>
*/
/**
* Settings.
*/
/**
* Apply at these breakpoints (turned off by default).
*/
$l-container-apply-at-breakpoints: $default-breakpoints !default;
// From the above breakpoints choose what you wish to apply it too
$l-container-apply-breakpoints-for-default: false !default;
$l-container-apply-breakpoints-for-full-bleed: false !default;
$l-container-apply-breakpoints-for-not-centered: false !default;
/**
* Widths.
*/
$l-container-width: 92% !default;
$l-container-minimum-width: 220 !default;
$l-container-maximum-width: 1600 !default;
.l-container {
width: $l-container-width;
@include to-rem(min-width, $l-container-minimum-width);
@include to-rem(max-width, $l-container-maximum-width);
margin: 0 auto;
// Print
@media print {
width: auto;
}
}
@if $l-container-apply-breakpoints-for-default {
@include generate-at-breakpoints('.l-container',
$l-container-apply-at-breakpoints) {
width: $l-container-width;
@include to-rem(min-width, $l-container-minimum-width);
@include to-rem(max-width, $l-container-maximum-width);
margin: 0 auto;
// Print
@media print {
width: auto;
}
}
}
/**
* Modifier: full bleed.
*/
.l-container--full-bleed {
width: auto;
max-width: none;
}
@if $l-container-apply-breakpoints-for-full-bleed {
@include generate-at-breakpoints('.l-container--full-bleed',
$l-container-apply-at-breakpoints) {
width: auto;
max-width: none;
}
}
/**
* Modifier: not centered.
*/
.l-container--not-centered {
margin-left: 0;
margin-right: 0;
}
@if $l-container-apply-breakpoints-for-not-centered {
@include generate-at-breakpoints('.l-container--not-centered',
$l-container-apply-at-breakpoints) {
margin-left: 0;
margin-right: 0;
}
}