@ons/design-system 73.13.0 → 74.0.0-gutters.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
.ons-container {
|
|
2
|
+
--ons-grid-gutter: #{$grid-gutter-mobile};
|
|
3
|
+
--ons-grid-container-padding: #{$grid-container-padding-mobile};
|
|
4
|
+
|
|
2
5
|
box-sizing: border-box;
|
|
3
6
|
margin: 0 auto;
|
|
4
7
|
max-width: $grid-max-width;
|
|
5
|
-
padding: 0
|
|
8
|
+
padding: 0 var(--ons-grid-container-padding);
|
|
6
9
|
position: relative;
|
|
7
10
|
width: 100%;
|
|
8
11
|
|
|
9
12
|
@include mq(s) {
|
|
10
|
-
|
|
13
|
+
--ons-grid-gutter: #{$grid-gutter-standard};
|
|
14
|
+
--ons-grid-container-padding: #{$grid-container-padding-standard};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&--wide,
|
|
18
|
+
&--full-width {
|
|
19
|
+
@include mq(s) {
|
|
20
|
+
--ons-grid-gutter: #{$grid-gutter-wide};
|
|
21
|
+
--ons-grid-container-padding: #{$grid-container-padding-wide};
|
|
22
|
+
}
|
|
11
23
|
}
|
|
12
24
|
|
|
13
25
|
&--wide {
|
|
14
|
-
max-width: $grid-max-
|
|
26
|
+
max-width: $grid-max-width-wide;
|
|
15
27
|
}
|
|
16
28
|
|
|
17
29
|
&--full-width {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
.ons-grid {
|
|
4
4
|
box-sizing: border-box;
|
|
5
5
|
font-size: 0;
|
|
6
|
-
margin-left:
|
|
6
|
+
margin-left: calc(var(--ons-grid-gutter) * -1);
|
|
7
7
|
|
|
8
8
|
&--float {
|
|
9
9
|
letter-spacing: 0;
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
|
|
32
32
|
&--spaced {
|
|
33
33
|
.ons-grid__col {
|
|
34
|
-
margin-bottom:
|
|
34
|
+
margin-bottom: var(--ons-grid-gutter);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
&.ons-grid--tight {
|
|
38
38
|
.ons-grid__col {
|
|
39
|
-
margin-bottom:
|
|
39
|
+
margin-bottom: calc(var(--ons-grid-gutter) / 2);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -58,15 +58,15 @@
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
&--tight {
|
|
61
|
-
margin-left:
|
|
61
|
+
margin-left: calc(var(--ons-grid-gutter) / -2);
|
|
62
62
|
|
|
63
63
|
.ons-grid__col {
|
|
64
|
-
padding-left:
|
|
64
|
+
padding-left: calc(var(--ons-grid-gutter) / 2);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
&--loose {
|
|
69
|
-
margin-left:
|
|
69
|
+
margin-left: calc(var(--ons-grid-gutter) * -2);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
&--gutterless {
|
|
@@ -111,26 +111,11 @@
|
|
|
111
111
|
display: flex;
|
|
112
112
|
margin-left: 0;
|
|
113
113
|
flex-flow: column nowrap;
|
|
114
|
+
gap: var(--ons-grid-gutter);
|
|
114
115
|
|
|
115
116
|
@include mq('m') {
|
|
116
117
|
flex-direction: row;
|
|
117
118
|
}
|
|
118
|
-
|
|
119
|
-
&--xl {
|
|
120
|
-
column-gap: 2rem;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
&--l {
|
|
124
|
-
column-gap: 1.5rem;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
&--m {
|
|
128
|
-
column-gap: 1.25rem;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
&--s {
|
|
132
|
-
column-gap: 1rem;
|
|
133
|
-
}
|
|
134
119
|
}
|
|
135
120
|
|
|
136
121
|
&__col {
|
|
@@ -139,7 +124,7 @@
|
|
|
139
124
|
display: inline-block;
|
|
140
125
|
// Fixes text overflow issues
|
|
141
126
|
min-width: 0;
|
|
142
|
-
padding-left:
|
|
127
|
+
padding-left: var(--ons-grid-gutter);
|
|
143
128
|
vertical-align: top;
|
|
144
129
|
width: 100%;
|
|
145
130
|
|
|
@@ -154,7 +139,7 @@
|
|
|
154
139
|
|
|
155
140
|
&--sticky\@m {
|
|
156
141
|
/* if parent element is set to flex, override the default align-self property
|
|
157
|
-
from stretch to flex-start so that it stays sticky on scroll after medium breakpoint -
|
|
142
|
+
from stretch to flex-start so that it stays sticky on scroll after medium breakpoint -
|
|
158
143
|
this is set for the table of contents component specifically */
|
|
159
144
|
.ons-grid-flex &,
|
|
160
145
|
.ons-grid-flex-gap & {
|
|
@@ -163,7 +148,7 @@
|
|
|
163
148
|
}
|
|
164
149
|
|
|
165
150
|
&--loose {
|
|
166
|
-
padding-left:
|
|
151
|
+
padding-left: calc(var(--ons-grid-gutter) * 2);
|
|
167
152
|
}
|
|
168
153
|
|
|
169
154
|
&--flex {
|
package/scss/vars/_grid.scss
CHANGED
|
@@ -10,10 +10,27 @@ $grid-bp: (
|
|
|
10
10
|
'2xl': 1600px,
|
|
11
11
|
) !default;
|
|
12
12
|
|
|
13
|
-
$grid-max-width:
|
|
14
|
-
$grid-max-
|
|
13
|
+
$grid-max-width: 69rem !default; // 1104px = 1024 content frame + 2×40 padding
|
|
14
|
+
$grid-max-width-wide: 87.5rem !default; // 1400px = 1304 content frame + 2×48 padding
|
|
15
15
|
$grid-cols: 12 !default;
|
|
16
16
|
$grid-cols-mobile: 4 !default;
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
// Inter-column gutter, per container mode
|
|
19
|
+
$grid-gutter-mobile: 0 !default;
|
|
20
|
+
$grid-gutter-standard: 2rem !default; // 32px
|
|
21
|
+
$grid-gutter-wide: 2.5rem !default; // 40px
|
|
22
|
+
|
|
23
|
+
// Container horizontal padding (space between container edge and its content)
|
|
24
|
+
$grid-container-padding-mobile: 1rem !default; // 16px
|
|
25
|
+
$grid-container-padding-standard: 2.5rem !default; // 40px
|
|
26
|
+
$grid-container-padding-wide: 3rem !default; // 48px
|
|
27
|
+
|
|
18
28
|
$grid-bp-fixed: map.get($grid-bp, m) !default;
|
|
19
29
|
$grid-baseline: 16px;
|
|
30
|
+
|
|
31
|
+
// Default custom properties for standalone .ons-grid usage (outside any .ons-container).
|
|
32
|
+
// .ons-container overrides these via inheritance.
|
|
33
|
+
:root {
|
|
34
|
+
--ons-grid-gutter: #{$grid-gutter-standard};
|
|
35
|
+
--ons-grid-container-padding: #{$grid-container-padding-standard};
|
|
36
|
+
}
|