@primer/css 0.0.0-2021102434953 → 0.0.0-20211029165521
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/CHANGELOG.md +3 -31
- package/DEVELOP.md +0 -15
- package/base/normalize.scss +1 -1
- package/box/index.scss +0 -1
- package/color-modes/index.scss +0 -1
- package/color-modes/themes/dark.scss +2 -2
- package/color-modes/themes/dark_colorblind.scss +2 -2
- package/color-modes/themes/dark_dimmed.scss +2 -2
- package/color-modes/themes/dark_high_contrast.scss +2 -2
- package/color-modes/themes/light.scss +2 -2
- package/color-modes/themes/light_colorblind.scss +2 -2
- package/deprecations.json +0 -4
- package/dist/actionlist.css.map +1 -1
- package/dist/alerts.css.map +1 -1
- package/dist/autocomplete.css.map +1 -1
- package/dist/avatars.css.map +1 -1
- package/dist/base.css +1 -1
- package/dist/base.css.map +1 -1
- package/dist/blankslate.css.map +1 -1
- package/dist/box.css +1 -1
- package/dist/box.css.map +1 -1
- package/dist/branch-name.css.map +1 -1
- package/dist/breadcrumb.css.map +1 -1
- package/dist/buttons.css.map +1 -1
- package/dist/color-modes.css +1 -1
- package/dist/color-modes.css.map +1 -1
- package/dist/core.css +1 -1
- package/dist/core.css.map +1 -1
- package/dist/deprecations.json +0 -4
- package/dist/dropdown.css.map +1 -1
- package/dist/forms.css.map +1 -1
- package/dist/header.css.map +1 -1
- package/dist/labels.css +1 -1
- package/dist/labels.css.map +1 -1
- package/dist/layout.css +1 -1
- package/dist/layout.css.map +1 -1
- package/dist/links.css.map +1 -1
- package/dist/loaders.css.map +1 -1
- package/dist/markdown.css.map +1 -1
- package/dist/marketing-buttons.css +1 -1
- package/dist/marketing-buttons.css.map +1 -1
- package/dist/marketing-type.css.map +1 -1
- package/dist/marketing-utilities.css.map +1 -1
- package/dist/marketing.css +1 -1
- package/dist/marketing.css.map +1 -1
- package/dist/meta.json +79 -66
- package/dist/navigation.css +1 -1
- package/dist/navigation.css.map +1 -1
- package/dist/pagination.css.map +1 -1
- package/dist/popover.css +1 -1
- package/dist/popover.css.map +1 -1
- package/dist/primer.css +4 -4
- package/dist/primer.css.map +1 -1
- package/dist/product.css +1 -1
- package/dist/product.css.map +1 -1
- package/dist/progress.css.map +1 -1
- package/dist/select-menu.css.map +1 -1
- package/dist/stats/base.json +1 -1
- package/dist/stats/box.json +1 -1
- package/dist/stats/color-modes.json +1 -1
- package/dist/stats/core.json +1 -1
- package/dist/stats/labels.json +1 -1
- package/dist/stats/layout.json +1 -1
- package/dist/stats/marketing-buttons.json +1 -1
- package/dist/stats/marketing.json +1 -1
- package/dist/stats/navigation.json +1 -1
- package/dist/stats/popover.json +1 -1
- package/dist/stats/primer.json +1 -1
- package/dist/stats/product.json +1 -1
- package/dist/subhead.css.map +1 -1
- package/dist/timeline.css.map +1 -1
- package/dist/toasts.css.map +1 -1
- package/dist/tooltips.css.map +1 -1
- package/dist/truncate.css.map +1 -1
- package/dist/utilities.css.map +1 -1
- package/dist/variables.json +62 -62
- package/index.scss +4 -4
- package/labels/labels.scss +1 -0
- package/layout/index.scss +1 -0
- package/layout/layout-beta.scss +444 -0
- package/layout/mixins.scss +97 -1
- package/marketing/buttons/button.scss +53 -95
- package/marketing/buttons/index.scss +2 -2
- package/marketing/support/index.scss +3 -2
- package/marketing/support/mixins.scss +66 -0
- package/marketing/support/variables.scss +5 -4
- package/marketing/type/index.scss +2 -2
- package/marketing/type/typography.scss +23 -23
- package/marketing/utilities/index.scss +5 -5
- package/marketing/utilities/layout.scss +1 -1
- package/navigation/underline-nav.scss +28 -56
- package/package.json +10 -10
- package/popover/popover.scss +4 -42
- package/support/mixins/layout.scss +5 -5
- package/support/mixins/misc.scss +1 -25
- package/support/variables/layout.scss +7 -8
- package/support/variables/typography.scss +1 -1
- package/box/box-overlay.scss +0 -40
- package/color-modes/themes/light_high_contrast.scss +0 -7
package/labels/labels.scss
CHANGED
package/layout/index.scss
CHANGED
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
// Component className
|
|
2
|
+
|
|
3
|
+
$Layout: 'LayoutBeta' !default;
|
|
4
|
+
$Layout-divider-color: red !default; // var(--color-border-default)
|
|
5
|
+
|
|
6
|
+
// Variant names
|
|
7
|
+
|
|
8
|
+
$Layout-variant-stackRegions: 'stackRegions' !default;
|
|
9
|
+
$Layout-variant-separateRegions: 'separateRegions' !default;
|
|
10
|
+
$Layout-variant-multiColumn: 'multiColumns' !default;
|
|
11
|
+
|
|
12
|
+
// Property modifier names
|
|
13
|
+
|
|
14
|
+
// Wrapper & spacing
|
|
15
|
+
$Layout-prop-outer-spacing: 'outer-spacing' !default; // outer-m?
|
|
16
|
+
$Layout-prop-inner-spacing: 'inner-spacing' !default; // inner-p?
|
|
17
|
+
$Layout-prop-column-gap: 'column-gap' !default;
|
|
18
|
+
$Layout-prop-row-gap: 'row-gap' !default;
|
|
19
|
+
|
|
20
|
+
$Layout-prop-pane-divider: 'pane-divider' !default;
|
|
21
|
+
$Layout-prop-header-divider: 'header-divider' !default;
|
|
22
|
+
$Layout-prop-footer-divider: 'footer-divider' !default;
|
|
23
|
+
|
|
24
|
+
// Pane
|
|
25
|
+
$Layout-prop-pane-position: 'pane-position' !default; // pane-pos?
|
|
26
|
+
$Layout-prop-pane-width: 'pane-width' !default; // pane-w?
|
|
27
|
+
$Layout-prop-pane-is-sticky: 'pane-is-sticky' !default; // pane-sticky?
|
|
28
|
+
|
|
29
|
+
// Content
|
|
30
|
+
$Layout-prop-content-width: 'content-width' !default; // content-w?
|
|
31
|
+
|
|
32
|
+
// Variants & responsive variants
|
|
33
|
+
|
|
34
|
+
$Layout-prop-flow-horizontal: 'multiColumns' !default; // flow-h?
|
|
35
|
+
$Layout-prop-responsive-behavior: 'variant' !default; // r?
|
|
36
|
+
|
|
37
|
+
// stackRegions-specific variants
|
|
38
|
+
$Layout-prop-stackRegions-pane-position: 'stackRegions-pane-position' !default; // r-pane-pos?
|
|
39
|
+
|
|
40
|
+
// separateRegions-specific variants
|
|
41
|
+
$Layout-prop-separateRegions-primary-region: 'primary' !default; // r-primary-region?
|
|
42
|
+
|
|
43
|
+
// Default Layout values
|
|
44
|
+
|
|
45
|
+
:root {
|
|
46
|
+
--Layout-pane-width: #{map-get($sidebar-width, 'sm')};
|
|
47
|
+
--Layout-content-width: 100%;
|
|
48
|
+
|
|
49
|
+
// stylelint-disable-next-line primer/no-undefined-vars
|
|
50
|
+
--Layout-template-columns: 1fr var(--Layout-pane-width);
|
|
51
|
+
--Layout-template-areas: 'content pane';
|
|
52
|
+
--Layout-column-gap: #{$spacer-3};
|
|
53
|
+
--Layout-row-gap: #{$spacer-3};
|
|
54
|
+
|
|
55
|
+
// A `px` unit is needed here to define it as a length type when used
|
|
56
|
+
// with a `calc()` function. See https://stackoverflow.com/a/32518348
|
|
57
|
+
//
|
|
58
|
+
// stylelint-disable length-zero-no-unit
|
|
59
|
+
--Layout-outer-spacing-x: 0px; // wrapper margin x
|
|
60
|
+
--Layout-outer-spacing-y: 0px; // wrapper margin y
|
|
61
|
+
|
|
62
|
+
--Layout-inner-spacing-min: 0px; // default region padding
|
|
63
|
+
--Layout-inner-spacing-max: 0px; // relaxed content horizontal padding
|
|
64
|
+
// stylelint-enable length-zero-no-unit
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.#{$Layout} {
|
|
68
|
+
// stylelint-disable-next-line primer/spacing
|
|
69
|
+
margin: var(--Layout-outer-spacing-y) var(--Layout-outer-spacing-x);
|
|
70
|
+
|
|
71
|
+
> .#{$Layout}-wrapper {
|
|
72
|
+
display: grid;
|
|
73
|
+
grid: auto-flow / 1fr;
|
|
74
|
+
row-gap: var(--Layout-row-gap);
|
|
75
|
+
|
|
76
|
+
> .#{$Layout}-regions {
|
|
77
|
+
display: grid;
|
|
78
|
+
column-gap: var(--Layout-column-gap);
|
|
79
|
+
row-gap: var(--Layout-row-gap);
|
|
80
|
+
grid-template-columns: var(--Layout-template-columns);
|
|
81
|
+
grid-template-rows: 1fr;
|
|
82
|
+
grid-template-areas: var(--Layout-template-areas);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Outer spacing
|
|
87
|
+
|
|
88
|
+
&.#{$Layout}--#{$Layout-prop-outer-spacing}-normal {
|
|
89
|
+
--Layout-outer-spacing-x: #{$spacer-3}; // 16px
|
|
90
|
+
--Layout-outer-spacing-y: #{$spacer-3}; // 16px
|
|
91
|
+
|
|
92
|
+
@include breakpoint(lg) {
|
|
93
|
+
--Layout-outer-spacing-x: #{$spacer-4}; // 24px
|
|
94
|
+
--Layout-outer-spacing-y: #{$spacer-4}; // 24px
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&.#{$Layout}--#{$Layout-prop-outer-spacing}-condensed {
|
|
99
|
+
--Layout-outer-spacing-x: #{$spacer-3}; // 16px
|
|
100
|
+
--Layout-outer-spacing-y: #{$spacer-3}; // 16px
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Inner spacing
|
|
104
|
+
|
|
105
|
+
&.#{$Layout}--#{$Layout-prop-inner-spacing}-normal {
|
|
106
|
+
--Layout-inner-spacing-min: #{$spacer-3}; // 16px
|
|
107
|
+
--Layout-inner-spacing-max: #{$spacer-3}; // 16px
|
|
108
|
+
|
|
109
|
+
@include breakpoint(lg) {
|
|
110
|
+
--Layout-inner-spacing-max: #{$spacer-4}; // 24px
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&.#{$Layout}--#{$Layout-prop-inner-spacing}-condensed {
|
|
115
|
+
--Layout-inner-spacing-min: #{$spacer-3}; // 16px
|
|
116
|
+
--Layout-inner-spacing-max: #{$spacer-3}; // 16px
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Column gap
|
|
120
|
+
|
|
121
|
+
&.#{$Layout}--#{$Layout-prop-column-gap}-normal {
|
|
122
|
+
--Layout-column-gap: #{$spacer-3}; // 16px
|
|
123
|
+
|
|
124
|
+
@include breakpoint(lg) {
|
|
125
|
+
--Layout-column-gap: #{$spacer-4}; // 24px
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&.#{$Layout}--#{$Layout-prop-column-gap}-condensed {
|
|
130
|
+
--Layout-column-gap: #{$spacer-3}; // 16px
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&.#{$Layout}--#{$Layout-prop-column-gap}-none {
|
|
134
|
+
// A `px` unit is needed here to define it as a length type when used
|
|
135
|
+
// with a `calc()` function. See https://stackoverflow.com/a/32518348
|
|
136
|
+
//
|
|
137
|
+
// stylelint-disable-next-line length-zero-no-unit
|
|
138
|
+
--Layout-column-gap: 0px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Row gap
|
|
142
|
+
|
|
143
|
+
&.#{$Layout}--#{$Layout-prop-row-gap}-normal {
|
|
144
|
+
--Layout-row-gap: #{$spacer-3}; // 16px
|
|
145
|
+
|
|
146
|
+
@include breakpoint(lg) {
|
|
147
|
+
--Layout-row-gap: #{$spacer-4}; // 24px
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&.#{$Layout}--#{$Layout-prop-row-gap}-none {
|
|
152
|
+
// A `px` unit is needed here to define it as a length type when used
|
|
153
|
+
// with a `calc()` function. See https://stackoverflow.com/a/32518348
|
|
154
|
+
//
|
|
155
|
+
// stylelint-disable length-zero-no-unit
|
|
156
|
+
--Layout-row-gap: 0px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&.#{$Layout}--#{$Layout-prop-row-gap}-condensed {
|
|
160
|
+
--Layout-row-gap: #{$spacer-3}; // 16px
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
// Layout variants
|
|
165
|
+
|
|
166
|
+
// -- Desktop-level multi-columns
|
|
167
|
+
|
|
168
|
+
// Layout--variant-stackRegions
|
|
169
|
+
// Layout--variant-separateRegions
|
|
170
|
+
|
|
171
|
+
// Layout--variant-md-multiColumns
|
|
172
|
+
// Layout--variant-lg-multiColumns
|
|
173
|
+
|
|
174
|
+
// -- Stack regions
|
|
175
|
+
|
|
176
|
+
&.#{$Layout}--#{$Layout-prop-responsive-behavior}-stackRegions {
|
|
177
|
+
|
|
178
|
+
&.#{$Layout}--variant-md-multiColumns {
|
|
179
|
+
@include Layout-stackRegions(md);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
&.#{$Layout}--variant-lg-multiColumns {
|
|
183
|
+
@include Layout-stackRegions(lg);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// -- Separate regions variant
|
|
188
|
+
|
|
189
|
+
&.#{$Layout}--#{$Layout-prop-responsive-behavior}-separateRegions {
|
|
190
|
+
|
|
191
|
+
&.#{$Layout}--variant-md-multiColumns {
|
|
192
|
+
@include Layout-separateRegions(md);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
&.#{$Layout}--variant-lg-multiColumns {
|
|
196
|
+
@include Layout-separateRegions(lg);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// multiColumn
|
|
201
|
+
|
|
202
|
+
// `flow-horizontal` determines whether `Layout` can render desktop-friendly
|
|
203
|
+
// two-column layouts. It should appear by default for compatibility
|
|
204
|
+
// with desktop browsers that have JavaScript disabled.
|
|
205
|
+
|
|
206
|
+
// Use `responsive-behaviorAt` to determine in which breakpoint `Layout` will
|
|
207
|
+
// stop flowing horizontally. In these cases `flow-horizontal` class will be
|
|
208
|
+
// removed.
|
|
209
|
+
|
|
210
|
+
// The reason this is not a media query is because it's still not possible to
|
|
211
|
+
// use CSS variables to determine the breakpoint dinamically. (And the other
|
|
212
|
+
// option would be to duplicate too much code.)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
// FIXME - do we want to call this flowHorizontal??
|
|
216
|
+
// at least call it `flow-md-horizontal` or something
|
|
217
|
+
|
|
218
|
+
&.#{$Layout}--variant-md-multiColumns {
|
|
219
|
+
@include breakpoint(md) {
|
|
220
|
+
@include Layout-multiColumn;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
&.#{$Layout}--variant-lg-multiColumns {
|
|
225
|
+
@include breakpoint(lg) {
|
|
226
|
+
@include Layout-multiColumn;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
//&.#{$Layout}--#{$Layout-prop-flow-horizontal} {
|
|
231
|
+
|
|
232
|
+
/*
|
|
233
|
+
&.#{$Layout}--#{$Layout-prop-pane-position}-start {
|
|
234
|
+
--Layout-template-columns: var(--Layout-pane-width) 1fr;
|
|
235
|
+
--Layout-template-areas: "pane content";
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
&.#{$Layout}--#{$Layout-prop-pane-position}-end {
|
|
239
|
+
--Layout-template-columns: 1fr var(--Layout-pane-width);
|
|
240
|
+
--Layout-template-areas: "content pane";
|
|
241
|
+
}
|
|
242
|
+
*/
|
|
243
|
+
|
|
244
|
+
// Pane divider
|
|
245
|
+
// FIXME
|
|
246
|
+
|
|
247
|
+
/*
|
|
248
|
+
FIXME - Use Layout-divider
|
|
249
|
+
// Header divider
|
|
250
|
+
|
|
251
|
+
&.#{$Layout}--#{$Layout-prop-header-divider} {
|
|
252
|
+
.#{$Layout}-header {
|
|
253
|
+
border-bottom: 1px solid $Layout-divider-color;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// Footer divider
|
|
258
|
+
|
|
259
|
+
&.#{$Layout}--#{$Layout-prop-footer-divider} {
|
|
260
|
+
.#{$Layout}-footer {
|
|
261
|
+
border-top: 1px solid $Layout-divider-color;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
*/
|
|
265
|
+
|
|
266
|
+
// Content width
|
|
267
|
+
|
|
268
|
+
[class^="#{$Layout}-content-centered-"] {
|
|
269
|
+
max-width: calc(var(--Layout-content-width) + var(--Layout-pane-width) + var(--Layout-column-gap));
|
|
270
|
+
margin-right: auto;
|
|
271
|
+
margin-left: auto;
|
|
272
|
+
|
|
273
|
+
> [class^='container-'] {
|
|
274
|
+
margin-left: 0;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
&.#{$Layout}--#{$Layout-prop-pane-divider} {
|
|
279
|
+
[class^="#{$Layout}-content-centered-"] {
|
|
280
|
+
max-width: calc(var(--Layout-content-width) + var(--Layout-pane-width) + (var(--Layout-column-gap) * 2));
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
@each $breakpoint in map-keys($breakpoints) {
|
|
285
|
+
.#{$Layout}-content-centered-#{$breakpoint} {
|
|
286
|
+
--Layout-content-width: #{map-get($breakpoints, $breakpoint)};
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// pane-width
|
|
291
|
+
|
|
292
|
+
@each $breakpoint in map-keys($sidebar-width) {
|
|
293
|
+
@include breakpoint($breakpoint) {
|
|
294
|
+
--Layout-pane-width: #{map-get($sidebar-width, $breakpoint)};
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
&.#{$Layout}--#{$Layout-prop-pane-width}-narrow {
|
|
299
|
+
@each $breakpoint in map-keys($sidebar-narrow-width) {
|
|
300
|
+
@include breakpoint($breakpoint) {
|
|
301
|
+
--Layout-pane-width: #{map-get($sidebar-narrow-width, $breakpoint)};
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
&.#{$Layout}--#{$Layout-prop-pane-width}-wide {
|
|
307
|
+
@each $breakpoint in map-keys($sidebar-wide-width) {
|
|
308
|
+
@include breakpoint($breakpoint) {
|
|
309
|
+
--Layout-pane-width: #{map-get($sidebar-wide-width, $breakpoint)};
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
// Responsive divider
|
|
315
|
+
|
|
316
|
+
&.#{$Layout}:not(.#{$Layout}--#{$Layout-prop-flow-horizontal}) {
|
|
317
|
+
|
|
318
|
+
/*
|
|
319
|
+
.#{$Layout}-region--line-divider {
|
|
320
|
+
position: relative;
|
|
321
|
+
padding-bottom: max(var(--Layout-row-gap), var(--Layout-inner-spacing-min));
|
|
322
|
+
border-bottom: 1px solid transparent;
|
|
323
|
+
|
|
324
|
+
&:after {
|
|
325
|
+
content: "";
|
|
326
|
+
display: block;
|
|
327
|
+
position: absolute;
|
|
328
|
+
background-color: var(--color-canvas-inset);
|
|
329
|
+
background-color: red;
|
|
330
|
+
width: calc(100% + (var(--Layout-outer-spacing-x) * 2));
|
|
331
|
+
height: 1px;
|
|
332
|
+
left: calc(var(--Layout-outer-spacing-x) * -1);
|
|
333
|
+
bottom: -1px;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.#{$Layout}-region--shallow-divider {
|
|
338
|
+
position: relative;
|
|
339
|
+
padding-bottom: max(var(--Layout-row-gap), var(--Layout-inner-spacing-min));
|
|
340
|
+
margin-bottom: #{$spacer-2}; // 8px
|
|
341
|
+
|
|
342
|
+
&:after {
|
|
343
|
+
content: "";
|
|
344
|
+
display: block;
|
|
345
|
+
position: absolute;
|
|
346
|
+
left: calc(var(--Layout-outer-spacing-x) * -1);
|
|
347
|
+
bottom: calc(#{$spacer-2} * -1); // -8px
|
|
348
|
+
width: calc(100% + (var(--Layout-outer-spacing-x) * 2));
|
|
349
|
+
height: #{$spacer-2}; // 8px
|
|
350
|
+
background-color: var(--color-canvas-inset);
|
|
351
|
+
box-shadow: inset 0 1px $Layout-divider-color, inset 0 -1px $Layout-divider-color;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
*/
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// Regions
|
|
358
|
+
|
|
359
|
+
.#{$Layout}-header, .#{$Layout}-content, .#{$Layout}-pane, .#{$Layout}-footer {
|
|
360
|
+
// stylelint-disable-next-line primer/spacing
|
|
361
|
+
padding: var(--Layout-inner-spacing-min);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.#{$Layout}-header {
|
|
365
|
+
background: lightpink;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.#{$Layout}-content {
|
|
369
|
+
// stylelint-disable primer/spacing
|
|
370
|
+
padding-left: var(--Layout-inner-spacing-max);
|
|
371
|
+
padding-right: var(--Layout-inner-spacing-max);
|
|
372
|
+
// stylelint-enable primer/spacing
|
|
373
|
+
grid-area: content;
|
|
374
|
+
background: rgb(255, 197, 253);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.#{$Layout}-pane {
|
|
378
|
+
grid-area: pane;
|
|
379
|
+
background: rgb(215, 255, 233);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.#{$Layout}-footer {
|
|
383
|
+
background: lightyellow;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// Layout dividers
|
|
389
|
+
|
|
390
|
+
// an <hr> horizontal line to be loosely used anywhere. Accompanied by
|
|
391
|
+
// ` divider-md-none` or ` divider-lg-none`, or `divider-divider-md-line` or
|
|
392
|
+
// `divider-divider-lg-line` for the filled line to be rendered as a thin line
|
|
393
|
+
// on larger viewports.
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
.#{$Layout}-divider-line {
|
|
397
|
+
|
|
398
|
+
}
|
|
399
|
+
.#{$Layout}-divider-filled {
|
|
400
|
+
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.#{$Layout}--divider-line-before {
|
|
404
|
+
border-top: 10px solid purple;
|
|
405
|
+
}
|
|
406
|
+
.#{$Layout}--divider-line-after {
|
|
407
|
+
border-bottom: 10px solid orange;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.#{$Layout}--divider-filled-before {
|
|
411
|
+
border-top: 20px solid purple;
|
|
412
|
+
}
|
|
413
|
+
.#{$Layout}--divider-filled-after {
|
|
414
|
+
border-bottom: 20px solid orange;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.#{$Layout}--variant-md-multiColumns {
|
|
418
|
+
@include breakpoint(md) {
|
|
419
|
+
.#{$Layout}-region--line-divider {
|
|
420
|
+
&:after {
|
|
421
|
+
display: none;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
// FIXME -- this doesn't need to be CSS utilities. can use same approach with mixins I've used for responsive behaviors
|
|
428
|
+
|
|
429
|
+
.#{$Layout}--divider-md-none {
|
|
430
|
+
@include breakpoint(md) {
|
|
431
|
+
border-top: 0;
|
|
432
|
+
border-bottom: 0;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.#{$Layout}--divider-lg-none {
|
|
437
|
+
@include breakpoint(lg) {
|
|
438
|
+
border-top: 0;
|
|
439
|
+
border-bottom: 0;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.#{$Layout}-divider-md-line-before { }
|
|
444
|
+
.#{$Layout}-divider-md-line-after { }
|
package/layout/mixins.scss
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Layout mixins
|
|
1
|
+
// Layout alpha mixins
|
|
2
2
|
|
|
3
3
|
@mixin flow-as-row {
|
|
4
4
|
grid-auto-flow: row;
|
|
@@ -77,3 +77,99 @@
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
+
|
|
81
|
+
// Layout beta mixins
|
|
82
|
+
|
|
83
|
+
@mixin Layout-multiColumn {
|
|
84
|
+
&.#{$Layout}--#{$Layout-prop-pane-position}-start {
|
|
85
|
+
--Layout-template-columns: var(--Layout-pane-width) 1fr;
|
|
86
|
+
--Layout-template-areas: "pane content";
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&.#{$Layout}--#{$Layout-prop-pane-position}-end {
|
|
90
|
+
--Layout-template-columns: 1fr var(--Layout-pane-width);
|
|
91
|
+
--Layout-template-areas: "content pane";
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Pane divider
|
|
95
|
+
|
|
96
|
+
&.#{$Layout}--#{$Layout-prop-pane-divider} {
|
|
97
|
+
&.#{$Layout}--#{$Layout-prop-pane-position}-start {
|
|
98
|
+
.#{$Layout}-pane {
|
|
99
|
+
border-right: 1px solid $Layout-divider-color;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&:not(.#{$Layout}--#{$Layout-prop-column-gap}-none) {
|
|
103
|
+
.#{$Layout}-pane {
|
|
104
|
+
margin-right: calc(var(--Layout-column-gap) * -1);
|
|
105
|
+
padding-right: calc(var(--Layout-column-gap) - 1px);
|
|
106
|
+
}
|
|
107
|
+
.#{$Layout}-content {
|
|
108
|
+
margin-left: var(--Layout-column-gap);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&.#{$Layout}--#{$Layout-prop-pane-position}-end {
|
|
114
|
+
.#{$Layout}-pane {
|
|
115
|
+
border-left: 1px solid $Layout-divider-color;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&:not(.#{$Layout}--#{$Layout-prop-column-gap}-none) {
|
|
119
|
+
.#{$Layout}-pane {
|
|
120
|
+
margin-left: calc(var(--Layout-column-gap) * -1);
|
|
121
|
+
padding-left: calc(var(--Layout-column-gap) - 1px);
|
|
122
|
+
}
|
|
123
|
+
.#{$Layout}-content {
|
|
124
|
+
margin-right: var(--Layout-column-gap);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Sticky pane
|
|
131
|
+
|
|
132
|
+
&.#{$Layout}--#{$Layout-prop-pane-is-sticky} {
|
|
133
|
+
.#{$Layout}-pane {
|
|
134
|
+
position: sticky;
|
|
135
|
+
top: 0;
|
|
136
|
+
max-height: 100vh;
|
|
137
|
+
overflow: auto;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@mixin Layout-stackRegions($max-breakpoint) {
|
|
143
|
+
@media (max-width: calc(#{map-get($breakpoints, $max-breakpoint)} - 0.02px)) {
|
|
144
|
+
--Layout-template-columns: 1fr;
|
|
145
|
+
|
|
146
|
+
// responsive-pane-position: end (default)
|
|
147
|
+
--Layout-template-areas: 'content' 'pane';
|
|
148
|
+
|
|
149
|
+
// responsive-pane-position: start
|
|
150
|
+
&.#{$Layout}--#{$Layout-prop-stackRegions-pane-position}-start {
|
|
151
|
+
--Layout-template-areas: 'pane' 'content';
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
@mixin Layout-separateRegions($max-breakpoint) {
|
|
157
|
+
@media (max-width: calc(#{map-get($breakpoints, $max-breakpoint)} - 0.02px)) {
|
|
158
|
+
--Layout-template-columns: 1fr;
|
|
159
|
+
--Layout-template-areas: 'content';
|
|
160
|
+
|
|
161
|
+
&.#{$Layout}--#{$Layout-prop-separateRegions-primary-region}-content {
|
|
162
|
+
--Layout-template-areas: 'content';
|
|
163
|
+
.#{$Layout}-pane {
|
|
164
|
+
display: none;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&.#{$Layout}--#{$Layout-prop-separateRegions-primary-region}-pane {
|
|
169
|
+
--Layout-template-areas: 'pane';
|
|
170
|
+
.#{$Layout}-content {
|
|
171
|
+
display: none;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|