forked from supple-kit/supple-css
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_index.scss
61 lines (47 loc) · 1.36 KB
/
_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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* =========================================================================
objects.retain
Page-level constraining and wrapping elements.
========================================================================= */
/* Use rules
`@use` everything you need here from other files. Variables, mixins &
other includes.
========================================================================= */
/**
* Forward the variables to the parent stylesheet
*/
@forward './variables';
/**
* Use the settings & tools in this sheet
*/
@use './variables';
@use '../../tools/space';
@use '../../tools/rem';
/* Module
========================================================================= */
/**
* Block: retain
* 1. Center align
*/
.o-retain {
--size: 100%;
max-inline-size: var(--size);
padding-inline-start: space.get(variables.$space);
padding-inline-end: space.get(variables.$space);
margin-inline-end: auto; /* [1] */
margin-inline-start: auto; /* [1] */
}
/**
* Modifier: no-padding
*/
.o-retain--no-padding {
padding-inline-end: 0;
padding-inline-start: 0;
}
/* Common width modifiers, for use in browsers without
custom-property support
========================================================================= */
@each $key, $value in variables.$sizes {
.o-retain--#{$key} {
--size: #{rem.convert($value)};
}
}