Debian Codegraph @

vendor/static/bulma/sass/grid/columns.sass

raw
1 @import "../utilities/mixins"
2
3 $column-gap: 0.75rem !default
4
5 .column
6 display: block
7 flex-basis: 0
8 flex-grow: 1
9 flex-shrink: 1
10 padding: $column-gap
11 .columns.is-mobile > &.is-narrow
12 flex: none
13 width: unset
14 .columns.is-mobile > &.is-full
15 flex: none
16 width: 100%
17 .columns.is-mobile > &.is-three-quarters
18 flex: none
19 width: 75%
20 .columns.is-mobile > &.is-two-thirds
21 flex: none
22 width: 66.6666%
23 .columns.is-mobile > &.is-half
24 flex: none
25 width: 50%
26 .columns.is-mobile > &.is-one-third
27 flex: none
28 width: 33.3333%
29 .columns.is-mobile > &.is-one-quarter
30 flex: none
31 width: 25%
32 .columns.is-mobile > &.is-one-fifth
33 flex: none
34 width: 20%
35 .columns.is-mobile > &.is-two-fifths
36 flex: none
37 width: 40%
38 .columns.is-mobile > &.is-three-fifths
39 flex: none
40 width: 60%
41 .columns.is-mobile > &.is-four-fifths
42 flex: none
43 width: 80%
44 .columns.is-mobile > &.is-offset-three-quarters
45 +ltr-property("margin", 75%, false)
46 .columns.is-mobile > &.is-offset-two-thirds
47 +ltr-property("margin", 66.6666%, false)
48 .columns.is-mobile > &.is-offset-half
49 +ltr-property("margin", 50%, false)
50 .columns.is-mobile > &.is-offset-one-third
51 +ltr-property("margin", 33.3333%, false)
52 .columns.is-mobile > &.is-offset-one-quarter
53 +ltr-property("margin", 25%, false)
54 .columns.is-mobile > &.is-offset-one-fifth
55 +ltr-property("margin", 20%, false)
56 .columns.is-mobile > &.is-offset-two-fifths
57 +ltr-property("margin", 40%, false)
58 .columns.is-mobile > &.is-offset-three-fifths
59 +ltr-property("margin", 60%, false)
60 .columns.is-mobile > &.is-offset-four-fifths
61 +ltr-property("margin", 80%, false)
62 @for $i from 0 through 12
63 .columns.is-mobile > &.is-#{$i}
64 flex: none
65 width: percentage(divide($i, 12))
66 .columns.is-mobile > &.is-offset-#{$i}
67 +ltr-property("margin", percentage(divide($i, 12)), false)
68 +mobile
69 &.is-narrow-mobile
70 flex: none
71 width: unset
72 &.is-full-mobile
73 flex: none
74 width: 100%
75 &.is-three-quarters-mobile
76 flex: none
77 width: 75%
78 &.is-two-thirds-mobile
79 flex: none
80 width: 66.6666%
81 &.is-half-mobile
82 flex: none
83 width: 50%
84 &.is-one-third-mobile
85 flex: none
86 width: 33.3333%
87 &.is-one-quarter-mobile
88 flex: none
89 width: 25%
90 &.is-one-fifth-mobile
91 flex: none
92 width: 20%
93 &.is-two-fifths-mobile
94 flex: none
95 width: 40%
96 &.is-three-fifths-mobile
97 flex: none
98 width: 60%
99 &.is-four-fifths-mobile
100 flex: none
101 width: 80%
102 &.is-offset-three-quarters-mobile
103 +ltr-property("margin", 75%, false)
104 &.is-offset-two-thirds-mobile
105 +ltr-property("margin", 66.6666%, false)
106 &.is-offset-half-mobile
107 +ltr-property("margin", 50%, false)
108 &.is-offset-one-third-mobile
109 +ltr-property("margin", 33.3333%, false)
110 &.is-offset-one-quarter-mobile
111 +ltr-property("margin", 25%, false)
112 &.is-offset-one-fifth-mobile
113 +ltr-property("margin", 20%, false)
114 &.is-offset-two-fifths-mobile
115 +ltr-property("margin", 40%, false)
116 &.is-offset-three-fifths-mobile
117 +ltr-property("margin", 60%, false)
118 &.is-offset-four-fifths-mobile
119 +ltr-property("margin", 80%, false)
120 @for $i from 0 through 12
121 &.is-#{$i}-mobile
122 flex: none
123 width: percentage(divide($i, 12))
124 &.is-offset-#{$i}-mobile
125 +ltr-property("margin", percentage(divide($i, 12)), false)
126 +tablet
127 &.is-narrow,
128 &.is-narrow-tablet
129 flex: none
130 width: unset
131 &.is-full,
132 &.is-full-tablet
133 flex: none
134 width: 100%
135 &.is-three-quarters,
136 &.is-three-quarters-tablet
137 flex: none
138 width: 75%
139 &.is-two-thirds,
140 &.is-two-thirds-tablet
141 flex: none
142 width: 66.6666%
143 &.is-half,
144 &.is-half-tablet
145 flex: none
146 width: 50%
147 &.is-one-third,
148 &.is-one-third-tablet
149 flex: none
150 width: 33.3333%
151 &.is-one-quarter,
152 &.is-one-quarter-tablet
153 flex: none
154 width: 25%
155 &.is-one-fifth,
156 &.is-one-fifth-tablet
157 flex: none
158 width: 20%
159 &.is-two-fifths,
160 &.is-two-fifths-tablet
161 flex: none
162 width: 40%
163 &.is-three-fifths,
164 &.is-three-fifths-tablet
165 flex: none
166 width: 60%
167 &.is-four-fifths,
168 &.is-four-fifths-tablet
169 flex: none
170 width: 80%
171 &.is-offset-three-quarters,
172 &.is-offset-three-quarters-tablet
173 +ltr-property("margin", 75%, false)
174 &.is-offset-two-thirds,
175 &.is-offset-two-thirds-tablet
176 +ltr-property("margin", 66.6666%, false)
177 &.is-offset-half,
178 &.is-offset-half-tablet
179 +ltr-property("margin", 50%, false)
180 &.is-offset-one-third,
181 &.is-offset-one-third-tablet
182 +ltr-property("margin", 33.3333%, false)
183 &.is-offset-one-quarter,
184 &.is-offset-one-quarter-tablet
185 +ltr-property("margin", 25%, false)
186 &.is-offset-one-fifth,
187 &.is-offset-one-fifth-tablet
188 +ltr-property("margin", 20%, false)
189 &.is-offset-two-fifths,
190 &.is-offset-two-fifths-tablet
191 +ltr-property("margin", 40%, false)
192 &.is-offset-three-fifths,
193 &.is-offset-three-fifths-tablet
194 +ltr-property("margin", 60%, false)
195 &.is-offset-four-fifths,
196 &.is-offset-four-fifths-tablet
197 +ltr-property("margin", 80%, false)
198 @for $i from 0 through 12
199 &.is-#{$i},
200 &.is-#{$i}-tablet
201 flex: none
202 width: percentage(divide($i, 12))
203 &.is-offset-#{$i},
204 &.is-offset-#{$i}-tablet
205 +ltr-property("margin", percentage(divide($i, 12)), false)
206 +touch
207 &.is-narrow-touch
208 flex: none
209 width: unset
210 &.is-full-touch
211 flex: none
212 width: 100%
213 &.is-three-quarters-touch
214 flex: none
215 width: 75%
216 &.is-two-thirds-touch
217 flex: none
218 width: 66.6666%
219 &.is-half-touch
220 flex: none
221 width: 50%
222 &.is-one-third-touch
223 flex: none
224 width: 33.3333%
225 &.is-one-quarter-touch
226 flex: none
227 width: 25%
228 &.is-one-fifth-touch
229 flex: none
230 width: 20%
231 &.is-two-fifths-touch
232 flex: none
233 width: 40%
234 &.is-three-fifths-touch
235 flex: none
236 width: 60%
237 &.is-four-fifths-touch
238 flex: none
239 width: 80%
240 &.is-offset-three-quarters-touch
241 +ltr-property("margin", 75%, false)
242 &.is-offset-two-thirds-touch
243 +ltr-property("margin", 66.6666%, false)
244 &.is-offset-half-touch
245 +ltr-property("margin", 50%, false)
246 &.is-offset-one-third-touch
247 +ltr-property("margin", 33.3333%, false)
248 &.is-offset-one-quarter-touch
249 +ltr-property("margin", 25%, false)
250 &.is-offset-one-fifth-touch
251 +ltr-property("margin", 20%, false)
252 &.is-offset-two-fifths-touch
253 +ltr-property("margin", 40%, false)
254 &.is-offset-three-fifths-touch
255 +ltr-property("margin", 60%, false)
256 &.is-offset-four-fifths-touch
257 +ltr-property("margin", 80%, false)
258 @for $i from 0 through 12
259 &.is-#{$i}-touch
260 flex: none
261 width: percentage(divide($i, 12))
262 &.is-offset-#{$i}-touch
263 +ltr-property("margin", percentage(divide($i, 12)), false)
264 +desktop
265 &.is-narrow-desktop
266 flex: none
267 width: unset
268 &.is-full-desktop
269 flex: none
270 width: 100%
271 &.is-three-quarters-desktop
272 flex: none
273 width: 75%
274 &.is-two-thirds-desktop
275 flex: none
276 width: 66.6666%
277 &.is-half-desktop
278 flex: none
279 width: 50%
280 &.is-one-third-desktop
281 flex: none
282 width: 33.3333%
283 &.is-one-quarter-desktop
284 flex: none
285 width: 25%
286 &.is-one-fifth-desktop
287 flex: none
288 width: 20%
289 &.is-two-fifths-desktop
290 flex: none
291 width: 40%
292 &.is-three-fifths-desktop
293 flex: none
294 width: 60%
295 &.is-four-fifths-desktop
296 flex: none
297 width: 80%
298 &.is-offset-three-quarters-desktop
299 +ltr-property("margin", 75%, false)
300 &.is-offset-two-thirds-desktop
301 +ltr-property("margin", 66.6666%, false)
302 &.is-offset-half-desktop
303 +ltr-property("margin", 50%, false)
304 &.is-offset-one-third-desktop
305 +ltr-property("margin", 33.3333%, false)
306 &.is-offset-one-quarter-desktop
307 +ltr-property("margin", 25%, false)
308 &.is-offset-one-fifth-desktop
309 +ltr-property("margin", 20%, false)
310 &.is-offset-two-fifths-desktop
311 +ltr-property("margin", 40%, false)
312 &.is-offset-three-fifths-desktop
313 +ltr-property("margin", 60%, false)
314 &.is-offset-four-fifths-desktop
315 +ltr-property("margin", 80%, false)
316 @for $i from 0 through 12
317 &.is-#{$i}-desktop
318 flex: none
319 width: percentage(divide($i, 12))
320 &.is-offset-#{$i}-desktop
321 +ltr-property("margin", percentage(divide($i, 12)), false)
322 +widescreen
323 &.is-narrow-widescreen
324 flex: none
325 width: unset
326 &.is-full-widescreen
327 flex: none
328 width: 100%
329 &.is-three-quarters-widescreen
330 flex: none
331 width: 75%
332 &.is-two-thirds-widescreen
333 flex: none
334 width: 66.6666%
335 &.is-half-widescreen
336 flex: none
337 width: 50%
338 &.is-one-third-widescreen
339 flex: none
340 width: 33.3333%
341 &.is-one-quarter-widescreen
342 flex: none
343 width: 25%
344 &.is-one-fifth-widescreen
345 flex: none
346 width: 20%
347 &.is-two-fifths-widescreen
348 flex: none
349 width: 40%
350 &.is-three-fifths-widescreen
351 flex: none
352 width: 60%
353 &.is-four-fifths-widescreen
354 flex: none
355 width: 80%
356 &.is-offset-three-quarters-widescreen
357 +ltr-property("margin", 75%, false)
358 &.is-offset-two-thirds-widescreen
359 +ltr-property("margin", 66.6666%, false)
360 &.is-offset-half-widescreen
361 +ltr-property("margin", 50%, false)
362 &.is-offset-one-third-widescreen
363 +ltr-property("margin", 33.3333%, false)
364 &.is-offset-one-quarter-widescreen
365 +ltr-property("margin", 25%, false)
366 &.is-offset-one-fifth-widescreen
367 +ltr-property("margin", 20%, false)
368 &.is-offset-two-fifths-widescreen
369 +ltr-property("margin", 40%, false)
370 &.is-offset-three-fifths-widescreen
371 +ltr-property("margin", 60%, false)
372 &.is-offset-four-fifths-widescreen
373 +ltr-property("margin", 80%, false)
374 @for $i from 0 through 12
375 &.is-#{$i}-widescreen
376 flex: none
377 width: percentage(divide($i, 12))
378 &.is-offset-#{$i}-widescreen
379 +ltr-property("margin", percentage(divide($i, 12)), false)
380 +fullhd
381 &.is-narrow-fullhd
382 flex: none
383 width: unset
384 &.is-full-fullhd
385 flex: none
386 width: 100%
387 &.is-three-quarters-fullhd
388 flex: none
389 width: 75%
390 &.is-two-thirds-fullhd
391 flex: none
392 width: 66.6666%
393 &.is-half-fullhd
394 flex: none
395 width: 50%
396 &.is-one-third-fullhd
397 flex: none
398 width: 33.3333%
399 &.is-one-quarter-fullhd
400 flex: none
401 width: 25%
402 &.is-one-fifth-fullhd
403 flex: none
404 width: 20%
405 &.is-two-fifths-fullhd
406 flex: none
407 width: 40%
408 &.is-three-fifths-fullhd
409 flex: none
410 width: 60%
411 &.is-four-fifths-fullhd
412 flex: none
413 width: 80%
414 &.is-offset-three-quarters-fullhd
415 +ltr-property("margin", 75%, false)
416 &.is-offset-two-thirds-fullhd
417 +ltr-property("margin", 66.6666%, false)
418 &.is-offset-half-fullhd
419 +ltr-property("margin", 50%, false)
420 &.is-offset-one-third-fullhd
421 +ltr-property("margin", 33.3333%, false)
422 &.is-offset-one-quarter-fullhd
423 +ltr-property("margin", 25%, false)
424 &.is-offset-one-fifth-fullhd
425 +ltr-property("margin", 20%, false)
426 &.is-offset-two-fifths-fullhd
427 +ltr-property("margin", 40%, false)
428 &.is-offset-three-fifths-fullhd
429 +ltr-property("margin", 60%, false)
430 &.is-offset-four-fifths-fullhd
431 +ltr-property("margin", 80%, false)
432 @for $i from 0 through 12
433 &.is-#{$i}-fullhd
434 flex: none
435 width: percentage(divide($i, 12))
436 &.is-offset-#{$i}-fullhd
437 +ltr-property("margin", percentage(divide($i, 12)), false)
438
439 .columns
440 +ltr-property("margin", (-$column-gap), false)
441 +ltr-property("margin", (-$column-gap))
442 margin-top: (-$column-gap)
443 &:last-child
444 margin-bottom: (-$column-gap)
445 &:not(:last-child)
446 margin-bottom: calc(1.5rem - #{$column-gap})
447 // Modifiers
448 &.is-centered
449 justify-content: center
450 &.is-gapless
451 +ltr-property("margin", 0, false)
452 +ltr-property("margin", 0)
453 margin-top: 0
454 & > .column
455 margin: 0
456 padding: 0 !important
457 &:not(:last-child)
458 margin-bottom: 1.5rem
459 &:last-child
460 margin-bottom: 0
461 &.is-mobile
462 display: flex
463 &.is-multiline
464 flex-wrap: wrap
465 &.is-vcentered
466 align-items: center
467 // Responsiveness
468 +tablet
469 &:not(.is-desktop)
470 display: flex
471 +desktop
472 // Modifiers
473 &.is-desktop
474 display: flex
475
476 @if $variable-columns
477 .columns.is-variable
478 --columnGap: 0.75rem
479 +ltr-property("margin", calc(-1 * var(--columnGap)), false)
480 +ltr-property("margin", calc(-1 * var(--columnGap)))
481 > .column
482 padding-left: var(--columnGap)
483 padding-right: var(--columnGap)
484 @for $i from 0 through 8
485 &.is-#{$i}
486 --columnGap: #{$i * 0.25rem}
487 +mobile
488 &.is-#{$i}-mobile
489 --columnGap: #{$i * 0.25rem}
490 +tablet
491 &.is-#{$i}-tablet
492 --columnGap: #{$i * 0.25rem}
493 +tablet-only
494 &.is-#{$i}-tablet-only
495 --columnGap: #{$i * 0.25rem}
496 +touch
497 &.is-#{$i}-touch
498 --columnGap: #{$i * 0.25rem}
499 +desktop
500 &.is-#{$i}-desktop
501 --columnGap: #{$i * 0.25rem}
502 +desktop-only
503 &.is-#{$i}-desktop-only
504 --columnGap: #{$i * 0.25rem}
505 +widescreen
506 &.is-#{$i}-widescreen
507 --columnGap: #{$i * 0.25rem}
508 +widescreen-only
509 &.is-#{$i}-widescreen-only
510 --columnGap: #{$i * 0.25rem}
511 +fullhd
512 &.is-#{$i}-fullhd
513 --columnGap: #{$i * 0.25rem}