@primer/css 0.0.0-2021117221921 → 0.0.0-2021117224315
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 +1 -1
- package/dist/core.css +1 -1
- package/dist/core.css.map +1 -1
- package/dist/layout.css +1 -1
- package/dist/layout.css.map +1 -1
- package/dist/meta.json +55 -55
- package/dist/primer.css +1 -1
- package/dist/primer.css.map +1 -1
- package/dist/stats/core.json +1 -1
- package/dist/stats/layout.json +1 -1
- package/dist/stats/primer.json +1 -1
- package/layout/page-layout.scss +30 -51
- package/package.json +1 -1
package/layout/page-layout.scss
CHANGED
|
@@ -4,27 +4,6 @@ $Layout: 'PageLayout' !default;
|
|
|
4
4
|
$Layout-divider-color: red !default; // var(--color-border-default)
|
|
5
5
|
$Layout-responsive-variant-max-breakpoint: 'md';
|
|
6
6
|
|
|
7
|
-
// Prop names
|
|
8
|
-
|
|
9
|
-
// dividers
|
|
10
|
-
$Layout-prop-pane-divider: 'has-pane-divider' !default;
|
|
11
|
-
$Layout-prop-header-divider: 'has-header-divider' !default;
|
|
12
|
-
$Layout-prop-footer-divider: 'has-footer-divider' !default;
|
|
13
|
-
|
|
14
|
-
// pane region
|
|
15
|
-
$Layout-prop-pane-position: 'pane-position' !default;
|
|
16
|
-
$Layout-prop-pane-width: 'pane-width' !default;
|
|
17
|
-
$Layout-prop-pane-is-sticky: 'is-pane-sticky' !default;
|
|
18
|
-
|
|
19
|
-
// content region
|
|
20
|
-
$Layout-prop-content-width: 'content-width' !default;
|
|
21
|
-
|
|
22
|
-
// stackRegions-specific variants
|
|
23
|
-
$Layout-prop-stackRegions-pane-position: 'stackRegions-pane-position' !default;
|
|
24
|
-
|
|
25
|
-
// separateRegions-specific variants
|
|
26
|
-
$Layout-prop-separateRegions-primary-region: 'primary' !default;
|
|
27
|
-
|
|
28
7
|
:root {
|
|
29
8
|
--Layout-pane-width: #{map-get($sidebar-width, 'sm')};
|
|
30
9
|
--Layout-content-width: 100%;
|
|
@@ -65,7 +44,7 @@ $Layout-prop-separateRegions-primary-region: 'primary' !default;
|
|
|
65
44
|
|
|
66
45
|
// outer spacing
|
|
67
46
|
|
|
68
|
-
&.#{$Layout}--
|
|
47
|
+
&.#{$Layout}--outerSpacing-normal {
|
|
69
48
|
--Layout-outer-spacing-x: #{$spacer-3}; // 16px
|
|
70
49
|
--Layout-outer-spacing-y: #{$spacer-3}; // 16px
|
|
71
50
|
|
|
@@ -75,14 +54,14 @@ $Layout-prop-separateRegions-primary-region: 'primary' !default;
|
|
|
75
54
|
}
|
|
76
55
|
}
|
|
77
56
|
|
|
78
|
-
&.#{$Layout}--
|
|
57
|
+
&.#{$Layout}--outerSpacing-condensed {
|
|
79
58
|
--Layout-outer-spacing-x: #{$spacer-3}; // 16px
|
|
80
59
|
--Layout-outer-spacing-y: #{$spacer-3}; // 16px
|
|
81
60
|
}
|
|
82
61
|
|
|
83
62
|
// inner spacing
|
|
84
63
|
|
|
85
|
-
&.#{$Layout}--
|
|
64
|
+
&.#{$Layout}--innerSpacing-normal {
|
|
86
65
|
--Layout-inner-spacing-min: #{$spacer-3}; // 16px
|
|
87
66
|
--Layout-inner-spacing-max: #{$spacer-3}; // 16px
|
|
88
67
|
|
|
@@ -91,14 +70,14 @@ $Layout-prop-separateRegions-primary-region: 'primary' !default;
|
|
|
91
70
|
}
|
|
92
71
|
}
|
|
93
72
|
|
|
94
|
-
&.#{$Layout}--
|
|
73
|
+
&.#{$Layout}--innerSpacing-condensed {
|
|
95
74
|
--Layout-inner-spacing-min: #{$spacer-3}; // 16px
|
|
96
75
|
--Layout-inner-spacing-max: #{$spacer-3}; // 16px
|
|
97
76
|
}
|
|
98
77
|
|
|
99
78
|
// column gap
|
|
100
79
|
|
|
101
|
-
&.#{$Layout}--
|
|
80
|
+
&.#{$Layout}--columnGap-normal {
|
|
102
81
|
--Layout-column-gap: #{$spacer-3}; // 16px
|
|
103
82
|
|
|
104
83
|
@include breakpoint(lg) {
|
|
@@ -106,11 +85,11 @@ $Layout-prop-separateRegions-primary-region: 'primary' !default;
|
|
|
106
85
|
}
|
|
107
86
|
}
|
|
108
87
|
|
|
109
|
-
&.#{$Layout}--
|
|
88
|
+
&.#{$Layout}--columnGap-condensed {
|
|
110
89
|
--Layout-column-gap: #{$spacer-3}; // 16px
|
|
111
90
|
}
|
|
112
91
|
|
|
113
|
-
&.#{$Layout}--
|
|
92
|
+
&.#{$Layout}--columnGap-none {
|
|
114
93
|
// the `px` unit is mandatory for `calc()` execution. See https://stackoverflow.com/a/32518348
|
|
115
94
|
// stylelint-disable-next-line length-zero-no-unit
|
|
116
95
|
--Layout-column-gap: 0px;
|
|
@@ -118,7 +97,7 @@ $Layout-prop-separateRegions-primary-region: 'primary' !default;
|
|
|
118
97
|
|
|
119
98
|
// row gap
|
|
120
99
|
|
|
121
|
-
&.#{$Layout}--
|
|
100
|
+
&.#{$Layout}--rowGap-normal {
|
|
122
101
|
--Layout-row-gap: #{$spacer-3}; // 16px
|
|
123
102
|
|
|
124
103
|
@include breakpoint(lg) {
|
|
@@ -126,13 +105,13 @@ $Layout-prop-separateRegions-primary-region: 'primary' !default;
|
|
|
126
105
|
}
|
|
127
106
|
}
|
|
128
107
|
|
|
129
|
-
&.#{$Layout}--
|
|
108
|
+
&.#{$Layout}--rowGap-none {
|
|
130
109
|
// the `px` unit is mandatory for `calc()` execution. See https://stackoverflow.com/a/32518348
|
|
131
110
|
// stylelint-disable length-zero-no-unit
|
|
132
111
|
--Layout-row-gap: 0px;
|
|
133
112
|
}
|
|
134
113
|
|
|
135
|
-
&.#{$Layout}--
|
|
114
|
+
&.#{$Layout}--rowGap-condensed {
|
|
136
115
|
--Layout-row-gap: #{$spacer-3}; // 16px
|
|
137
116
|
}
|
|
138
117
|
|
|
@@ -173,19 +152,19 @@ $Layout-prop-separateRegions-primary-region: 'primary' !default;
|
|
|
173
152
|
// `pane` is not yet loaded. See https://github.com/primer/css/pull/1818
|
|
174
153
|
$Layout-content-full-width: minmax(0, calc(100% - var(--Layout-pane-width) - var(--Layout-column-gap)));
|
|
175
154
|
|
|
176
|
-
&.#{$Layout}--
|
|
155
|
+
&.#{$Layout}--panePos-start {
|
|
177
156
|
--Layout-template-columns: var(--Layout-pane-width) #{$Layout-content-full-width};
|
|
178
157
|
--Layout-template-areas: "pane content";
|
|
179
158
|
}
|
|
180
159
|
|
|
181
|
-
&.#{$Layout}--
|
|
160
|
+
&.#{$Layout}--panePos-end {
|
|
182
161
|
--Layout-template-columns: #{$Layout-content-full-width} var(--Layout-pane-width);
|
|
183
162
|
--Layout-template-areas: "content pane";
|
|
184
163
|
}
|
|
185
164
|
|
|
186
165
|
// header divider
|
|
187
166
|
|
|
188
|
-
&.#{$Layout}
|
|
167
|
+
&.#{$Layout}--hasHeaderDivider {
|
|
189
168
|
.#{$Layout}-header {
|
|
190
169
|
padding-bottom: max(var(--Layout-row-gap), var(--Layout-inner-spacing-min));
|
|
191
170
|
border-bottom: 1px solid $Layout-divider-color;
|
|
@@ -194,7 +173,7 @@ $Layout-prop-separateRegions-primary-region: 'primary' !default;
|
|
|
194
173
|
|
|
195
174
|
// footer divider
|
|
196
175
|
|
|
197
|
-
&.#{$Layout}
|
|
176
|
+
&.#{$Layout}--hasFooterDivider {
|
|
198
177
|
.#{$Layout}-footer {
|
|
199
178
|
padding-top: max(var(--Layout-row-gap), var(--Layout-inner-spacing-min));
|
|
200
179
|
border-top: 1px solid $Layout-divider-color;
|
|
@@ -204,13 +183,13 @@ $Layout-prop-separateRegions-primary-region: 'primary' !default;
|
|
|
204
183
|
|
|
205
184
|
// pane divider
|
|
206
185
|
|
|
207
|
-
&.#{$Layout}
|
|
208
|
-
&.#{$Layout}--
|
|
186
|
+
&.#{$Layout}--hasPaneDivider {
|
|
187
|
+
&.#{$Layout}--panePos-start {
|
|
209
188
|
.#{$Layout}-pane {
|
|
210
189
|
border-right: 1px solid $Layout-divider-color;
|
|
211
190
|
}
|
|
212
191
|
|
|
213
|
-
&:not(.#{$Layout}--
|
|
192
|
+
&:not(.#{$Layout}--columnGap-none) {
|
|
214
193
|
.#{$Layout}-pane {
|
|
215
194
|
margin-right: calc(var(--Layout-column-gap) * -1);
|
|
216
195
|
padding-right: calc(var(--Layout-column-gap) - 1px);
|
|
@@ -221,12 +200,12 @@ $Layout-prop-separateRegions-primary-region: 'primary' !default;
|
|
|
221
200
|
}
|
|
222
201
|
}
|
|
223
202
|
|
|
224
|
-
&.#{$Layout}--
|
|
203
|
+
&.#{$Layout}--panePos-end {
|
|
225
204
|
.#{$Layout}-pane {
|
|
226
205
|
border-left: 1px solid $Layout-divider-color;
|
|
227
206
|
}
|
|
228
207
|
|
|
229
|
-
&:not(.#{$Layout}--
|
|
208
|
+
&:not(.#{$Layout}--columnGap-none) {
|
|
230
209
|
.#{$Layout}-pane {
|
|
231
210
|
margin-left: calc(var(--Layout-column-gap) * -1);
|
|
232
211
|
padding-left: calc(var(--Layout-column-gap) - 1px);
|
|
@@ -240,7 +219,7 @@ $Layout-prop-separateRegions-primary-region: 'primary' !default;
|
|
|
240
219
|
|
|
241
220
|
// sticky pane
|
|
242
221
|
|
|
243
|
-
&.#{$Layout}--
|
|
222
|
+
&.#{$Layout}--isPaneSticky {
|
|
244
223
|
.#{$Layout}-pane {
|
|
245
224
|
position: sticky;
|
|
246
225
|
top: 0;
|
|
@@ -257,19 +236,19 @@ $Layout-prop-separateRegions-primary-region: 'primary' !default;
|
|
|
257
236
|
margin-left: auto;
|
|
258
237
|
}
|
|
259
238
|
|
|
260
|
-
&.#{$Layout}
|
|
239
|
+
&.#{$Layout}--hasPaneDivider {
|
|
261
240
|
[class^="#{$Layout}-content-centered-"] {
|
|
262
241
|
max-width: calc(var(--Layout-content-width) + var(--Layout-pane-width) + (var(--Layout-column-gap) * 2));
|
|
263
242
|
}
|
|
264
243
|
}
|
|
265
244
|
|
|
266
|
-
&.#{$Layout}--
|
|
245
|
+
&.#{$Layout}--panePos-start {
|
|
267
246
|
[class^="#{$Layout}-content-centered-"] > [class^='container-'] {
|
|
268
247
|
margin-left: 0;
|
|
269
248
|
}
|
|
270
249
|
}
|
|
271
250
|
|
|
272
|
-
&.#{$Layout}--
|
|
251
|
+
&.#{$Layout}--panePos-end {
|
|
273
252
|
[class^="#{$Layout}-content-centered-"] > [class^='container-'] {
|
|
274
253
|
margin-right: 0;
|
|
275
254
|
}
|
|
@@ -289,7 +268,7 @@ $Layout-prop-separateRegions-primary-region: 'primary' !default;
|
|
|
289
268
|
}
|
|
290
269
|
}
|
|
291
270
|
|
|
292
|
-
&.#{$Layout}
|
|
271
|
+
&.#{$Layout}--paneWidth-narrow {
|
|
293
272
|
@each $breakpoint in map-keys($sidebar-narrow-width) {
|
|
294
273
|
@include breakpoint($breakpoint) {
|
|
295
274
|
--Layout-pane-width: #{map-get($sidebar-narrow-width, $breakpoint)};
|
|
@@ -297,7 +276,7 @@ $Layout-prop-separateRegions-primary-region: 'primary' !default;
|
|
|
297
276
|
}
|
|
298
277
|
}
|
|
299
278
|
|
|
300
|
-
&.#{$Layout}
|
|
279
|
+
&.#{$Layout}--paneWidth-wide {
|
|
301
280
|
@each $breakpoint in map-keys($sidebar-wide-width) {
|
|
302
281
|
@include breakpoint($breakpoint) {
|
|
303
282
|
--Layout-pane-width: #{map-get($sidebar-wide-width, $breakpoint)};
|
|
@@ -315,11 +294,11 @@ $Layout-prop-separateRegions-primary-region: 'primary' !default;
|
|
|
315
294
|
&.#{$Layout}--variant-stackRegions {
|
|
316
295
|
--Layout-template-columns: 1fr;
|
|
317
296
|
|
|
318
|
-
// responsive-
|
|
297
|
+
// responsive-panePos: end (default)
|
|
319
298
|
--Layout-template-areas: 'content' 'pane';
|
|
320
299
|
|
|
321
|
-
// responsive-
|
|
322
|
-
&.#{$Layout}
|
|
300
|
+
// responsive-panePos: start
|
|
301
|
+
&.#{$Layout}--variant-stackRegions-panePos-start {
|
|
323
302
|
--Layout-template-areas: 'pane' 'content';
|
|
324
303
|
}
|
|
325
304
|
}
|
|
@@ -330,14 +309,14 @@ $Layout-prop-separateRegions-primary-region: 'primary' !default;
|
|
|
330
309
|
--Layout-template-columns: 1fr;
|
|
331
310
|
--Layout-template-areas: 'content';
|
|
332
311
|
|
|
333
|
-
&.#{$Layout}
|
|
312
|
+
&.#{$Layout}--variant-separateRegions-primary-content {
|
|
334
313
|
--Layout-template-areas: 'content';
|
|
335
314
|
.#{$Layout}-pane {
|
|
336
315
|
display: none;
|
|
337
316
|
}
|
|
338
317
|
}
|
|
339
318
|
|
|
340
|
-
&.#{$Layout}
|
|
319
|
+
&.#{$Layout}--variant-separateRegions-primary-pane {
|
|
341
320
|
--Layout-template-areas: 'pane';
|
|
342
321
|
.#{$Layout}-content {
|
|
343
322
|
display: none;
|
package/package.json
CHANGED