1 | @use 'sass:math';
|
2 | @use '../internal' as *;
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | section {
|
8 | display: block;
|
9 | }
|
10 |
|
11 | .content {
|
12 | max-width: 48em;
|
13 | margin: 0 auto 1.5em;
|
14 | width: 100%;
|
15 |
|
16 | @include screen-above($md) {
|
17 | max-width: 64em;
|
18 | }
|
19 |
|
20 | @include screen-above($lg) {
|
21 | max-width: 80em;
|
22 | }
|
23 |
|
24 | @include screen-above($xl) {
|
25 | max-width: 96em;
|
26 | }
|
27 | }
|
28 |
|
29 | .fullscreen {
|
30 | top: 0;
|
31 | right: 0;
|
32 | bottom: 0;
|
33 | left: 0;
|
34 | min-height: 100vh;
|
35 | }
|
36 |
|
37 |
|
38 | .divider {
|
39 | border-top: 0.05rem solid transparentize(fill('gray', '500'), 0.5);
|
40 | height: 0.1rem;
|
41 | margin: 1.8rem 0 1.6rem;
|
42 | position: relative;
|
43 |
|
44 | &[data-content] {
|
45 | margin: 0.8rem 0;
|
46 | }
|
47 |
|
48 | &--v[data-content]::after,
|
49 | &[data-content]::after {
|
50 | background: #fff;
|
51 | color: fill('gray', '500');
|
52 | content: attr(data-content);
|
53 | left: 50%;
|
54 | display: inline-block;
|
55 | padding: 0 0.4rem;
|
56 | position: absolute;
|
57 | transform: translate(-50%, -50%);
|
58 | top: 50%;
|
59 | }
|
60 |
|
61 | &--v,
|
62 | &--v[data-content] {
|
63 | display: block;
|
64 | padding: 0.8rem;
|
65 |
|
66 | &::before {
|
67 | border-left: 0.05rem solid transparentize(fill('gray', '500'), 0.5);
|
68 | bottom: 0.4rem;
|
69 | content: '';
|
70 | display: block;
|
71 | left: 50%;
|
72 | position: absolute;
|
73 | top: 0;
|
74 | transform: translateX(-50%);
|
75 | }
|
76 | }
|
77 |
|
78 | &--v[data-content] {
|
79 | left: 50%;
|
80 | padding: 0.2rem 0;
|
81 | position: absolute;
|
82 | top: 50%;
|
83 | transform: translate(-50%, -50%);
|
84 | }
|
85 | }
|
86 |
|
87 | .hero-img {
|
88 |
|
89 | background-size: cover;
|
90 | }
|
91 |
|
92 | .parallax-img {
|
93 | background-attachment: fixed !important;
|
94 | }
|
95 |
|
96 | .hero {
|
97 |
|
98 | align-items: stretch;
|
99 | display: flex;
|
100 | justify-content: space-between;
|
101 |
|
102 | .hero-body {
|
103 | flex-grow: 1;
|
104 | flex-shrink: 0;
|
105 | padding: 3rem 1.5rem;
|
106 | align-items: center;
|
107 | display: flex;
|
108 | width: 100%;
|
109 | }
|
110 | }
|
111 |
|
112 | .space {
|
113 | display: block;
|
114 | width: 100%;
|
115 | height: 1rem;
|
116 |
|
117 | @each $size, $property-map in $space-sizes {
|
118 | &.space--#{$size} {
|
119 | @include explode-properties($property-map);
|
120 | }
|
121 | }
|
122 | }
|
123 |
|
124 |
|
125 | .row {
|
126 | flex: 1;
|
127 | flex-wrap: wrap;
|
128 | padding: 0.5rem 0;
|
129 | display: flex;
|
130 |
|
131 | &::after {
|
132 | content: '';
|
133 | clear: both;
|
134 | display: table;
|
135 | }
|
136 |
|
137 | &.row--no-wrap {
|
138 | flex-wrap: nowrap;
|
139 | overflow-x: auto;
|
140 | }
|
141 |
|
142 |
|
143 | .col {
|
144 | display: block;
|
145 | flex: 1;
|
146 | padding: 0.15rem 0.75rem;
|
147 | }
|
148 |
|
149 |
|
150 | .offset-right {
|
151 | margin-left: 0;
|
152 | margin-right: auto;
|
153 | }
|
154 |
|
155 |
|
156 | .offset-center {
|
157 | margin-left: auto;
|
158 | margin-right: auto;
|
159 | }
|
160 |
|
161 | .offset-left {
|
162 | margin-left: auto;
|
163 | margin-right: 0;
|
164 | }
|
165 |
|
166 |
|
167 | &.divided [class^='col'],
|
168 | &.divided [class*=' col'] {
|
169 | box-shadow: 0 -1px 0 0 transparentize(fill('gray', '500'), 0.5);
|
170 | }
|
171 |
|
172 |
|
173 | [class^='col-'],
|
174 | [class*=' col-'] {
|
175 | width: 100%;
|
176 | margin-left: 0;
|
177 | padding: 0 0.5rem;
|
178 | }
|
179 |
|
180 |
|
181 | @for $i from 1 through $flex-columns {
|
182 | @include screen-above($sm) {
|
183 |
|
184 | .col-#{$i} {
|
185 | width: percentage($number: $flex-width * $i);
|
186 | }
|
187 | }
|
188 | }
|
189 |
|
190 | @include generate-styles-with-viewports() using ($viewport) {
|
191 | @for $i from 1 through $flex-columns {
|
192 |
|
193 | $v: if($viewport != '', '-#{$viewport}-', '-xs-');
|
194 | .col#{$v}#{$i} {
|
195 | width: percentage($number: $flex-width * $i);
|
196 | }
|
197 | }
|
198 | }
|
199 |
|
200 | @for $i from 1 through $flex-columns {
|
201 | @include screen-above($xs) {
|
202 | .offset-#{$i} {
|
203 | margin-left: percentage($number: $flex-width * $i);
|
204 | }
|
205 | }
|
206 | }
|
207 |
|
208 |
|
209 | &.no-space [class^='col-'],
|
210 | &.no-space [class*=' col-'] {
|
211 | padding: 0;
|
212 | }
|
213 | }
|
214 |
|
215 | .r {
|
216 |
|
217 | max-width: 100%;
|
218 | padding: 0.5rem;
|
219 | }
|
220 |
|
221 | .level {
|
222 | align-items: center;
|
223 | justify-content: space-between;
|
224 |
|
225 | .level-item {
|
226 |
|
227 | align-items: center;
|
228 | display: flex;
|
229 | flex-basis: auto;
|
230 | flex-grow: 0;
|
231 | flex-shrink: 0;
|
232 | justify-content: center;
|
233 | }
|
234 |
|
235 |
|
236 | .level-content {
|
237 | flex-basis: auto;
|
238 | flex-grow: 1;
|
239 | flex-shrink: 1;
|
240 | text-align: left;
|
241 | width: 100%;
|
242 | }
|
243 | }
|
244 |
|
245 |
|
246 | @include generate-classes-for-viewport-with-map($heights, 'height', 'h-', #{get-viewport-flag($HEIGHTS)});
|
247 | @include generate-classes-for-viewport-with-map($widths, 'width', 'w-', #{get-viewport-flag($WIDTHS)});
|
248 | @include generate-classes-for-viewport-with-map(
|
249 | $min-heights,
|
250 | 'min-height',
|
251 | 'min-h-',
|
252 | #{get-viewport-flag($MIN-HEIGHT)}
|
253 | );
|
254 | @include generate-classes-for-viewport-with-map($min-widths, 'min-width', 'min-w-', #{get-viewport-flag($MIN-WIDTH)});
|
255 | @include generate-classes-for-viewport-with-map(
|
256 | $max-heights,
|
257 | 'max-height',
|
258 | 'max-h-',
|
259 | #{get-viewport-flag($MAX-HEIGHT)}
|
260 | );
|
261 | @include generate-classes-for-viewport-with-map($max-widths, 'max-width', 'max-w-', #{get-viewport-flag($MAX-WIDTH)});
|
262 |
|
263 |
|
264 | .level,
|
265 | .level-left,
|
266 | .level-right {
|
267 | @include screen-above($sm) {
|
268 | display: flex;
|
269 | }
|
270 | }
|
271 |
|
272 | @include screen-below($sm) {
|
273 | .level-right {
|
274 | margin-left: 1rem;
|
275 | }
|
276 |
|
277 |
|
278 | .level.fill-height {
|
279 | align-items: stretch;
|
280 | display: flex;
|
281 | }
|
282 | }
|
283 |
|
284 |
|
285 | @include screen-below($sm) {
|
286 | .container {
|
287 | width: 100%;
|
288 | }
|
289 |
|
290 | .row {
|
291 | margin-top: 0;
|
292 | }
|
293 |
|
294 |
|
295 | .divided > .row [class^='col-'],
|
296 | .divided > .row [class*=' col-'] {
|
297 | box-shadow: 0 -1px 0 0 rgba(34, 36, 38, 0.15);
|
298 | }
|
299 |
|
300 | .level.fill-height {
|
301 | display: inherit;
|
302 | }
|
303 |
|
304 | .hero-body {
|
305 | padding: 0;
|
306 | }
|
307 | }
|