/
_index.scss
41 lines (34 loc) · 1014 Bytes
/
_index.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
/* ==========================================================================
objects.flow
Create a rule that sibling elements apply a common margin that is either
globally defined or contextually set.
/ =========================================================================== */
/**
* Forward the variables to the parent stylesheet
*/
@forward './variables';
/**
* Use the settings & tools in this sheet
*/
@use './variables';
@use '../../settings/defaults';
@use '../../tools/space';
/* --------------------------------------------------------------------------
Module
/ --------------------------------------------------------------------------- */
.o-flow {
$selector: '> * + *';
@if defaults.$css-modules {
$selector: ':global(#{$selector})';
}
--gap: #{space.get(variables.$gap)};
--flow-gap: var(--gap);
#{$selector} {
margin-block-start: var(--flow-gap);
}
}
@each $gap in variables.$gaps {
.o-flow--#{$gap} {
--flow-gap: #{space.get($gap)};
}
}