Skip to content

Commit 70d059d

Browse files
authored
Merge pull request #807 from sparkdesignsystem/staging
staging into master, ready publish
2 parents 284af46 + 4c3294d commit 70d059d

File tree

29 files changed

+3708
-4013
lines changed

29 files changed

+3708
-4013
lines changed

packages/spark-core/objects/_stack.scss

Lines changed: 197 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
// Aligns items to end of container when in flex-direction row
2929
// at specific breakpoints
3030
///
31+
.sprk-o-Stack--end-row\@xxs {
32+
@media all and (min-width: $split-breakpoint-xxs) {
33+
justify-content: flex-end;
34+
}
35+
}
36+
3137
.sprk-o-Stack--end-row\@xs {
3238
@media all and (min-width: $split-breakpoint-xs) {
3339
justify-content: flex-end;
@@ -67,6 +73,12 @@
6773
// Aligns items to end of container when in flex-direction column
6874
// at specific breakpoints
6975
///
76+
.sprk-o-Stack--end-column\@xxs {
77+
@media all and (min-width: $split-breakpoint-xxs) {
78+
align-items: flex-end;
79+
}
80+
}
81+
7082
.sprk-o-Stack--end-column\@xs {
7183
@media all and (min-width: $split-breakpoint-xs) {
7284
align-items: flex-end;
@@ -138,15 +150,167 @@
138150
margin-bottom: 0;
139151
}
140152

141-
[class*='sprk-o-Stack__item--sixth\@'],
142-
[class*='sprk-o-Stack__item--fifth\@'],
143-
[class*='sprk-o-Stack__item--fourth\@'],
144-
[class*='sprk-o-Stack__item--third\@'],
145-
[class*='sprk-o-Stack__item--half\@'],
146-
[class*='sprk-o-Stack__item--three-fifths\@'],
147-
[class*='sprk-o-Stack__item--three-fourths\@'],
148-
[class*='sprk-o-Stack__item--two-fifths\@'] {
149-
margin: 0 !important;
153+
[class*='sprk-o-Stack__item--sixth\@xxs'],
154+
[class*='sprk-o-Stack__item--fifth\@xxs'],
155+
[class*='sprk-o-Stack__item--fourth\@xxs'],
156+
[class*='sprk-o-Stack__item--third\@xxs'],
157+
[class*='sprk-o-Stack__item--half\@xxs'],
158+
[class*='sprk-o-Stack__item--three-fifths\@xxs'],
159+
[class*='sprk-o-Stack__item--three-fourths\@xxs'],
160+
[class*='sprk-o-Stack__item--two-fifths\@xxs'] {
161+
@media all and (min-width: $split-breakpoint-xxs) {
162+
margin: 0 !important;
163+
}
164+
}
165+
166+
[class*='sprk-o-Stack__item--sixth\@xs'],
167+
[class*='sprk-o-Stack__item--fifth\@xs'],
168+
[class*='sprk-o-Stack__item--fourth\@xs'],
169+
[class*='sprk-o-Stack__item--third\@xs'],
170+
[class*='sprk-o-Stack__item--half\@xs'],
171+
[class*='sprk-o-Stack__item--three-fifths\@xs'],
172+
[class*='sprk-o-Stack__item--three-fourths\@xs'],
173+
[class*='sprk-o-Stack__item--two-fifths\@xs'] {
174+
@media all and (min-width: $split-breakpoint-xs) {
175+
margin: 0 !important;
176+
}
177+
}
178+
179+
[class*='sprk-o-Stack__item--sixth\@s'],
180+
[class*='sprk-o-Stack__item--fifth\@s'],
181+
[class*='sprk-o-Stack__item--fourth\@s'],
182+
[class*='sprk-o-Stack__item--third\@s'],
183+
[class*='sprk-o-Stack__item--half\@s'],
184+
[class*='sprk-o-Stack__item--three-fifths\@s'],
185+
[class*='sprk-o-Stack__item--three-fourths\@s'],
186+
[class*='sprk-o-Stack__item--two-fifths\@s'] {
187+
@media all and (min-width: $split-breakpoint-s) {
188+
margin: 0 !important;
189+
}
190+
}
191+
192+
[class*='sprk-o-Stack__item--sixth\@m'],
193+
[class*='sprk-o-Stack__item--fifth\@m'],
194+
[class*='sprk-o-Stack__item--fourth\@m'],
195+
[class*='sprk-o-Stack__item--third\@m'],
196+
[class*='sprk-o-Stack__item--half\@m'],
197+
[class*='sprk-o-Stack__item--three-fifths\@m'],
198+
[class*='sprk-o-Stack__item--three-fourths\@m'],
199+
[class*='sprk-o-Stack__item--two-fifths\@m'] {
200+
@media all and (min-width: $split-breakpoint-m) {
201+
margin: 0 !important;
202+
}
203+
}
204+
205+
[class*='sprk-o-Stack__item--sixth\@l'],
206+
[class*='sprk-o-Stack__item--fifth\@l'],
207+
[class*='sprk-o-Stack__item--fourth\@l'],
208+
[class*='sprk-o-Stack__item--third\@l'],
209+
[class*='sprk-o-Stack__item--half\@l'],
210+
[class*='sprk-o-Stack__item--three-fifths\@l'],
211+
[class*='sprk-o-Stack__item--three-fourths\@l'],
212+
[class*='sprk-o-Stack__item--two-fifths\@l'] {
213+
@media all and (min-width: $split-breakpoint-l) {
214+
margin: 0 !important;
215+
}
216+
}
217+
218+
[class*='sprk-o-Stack__item--sixth\@xl'],
219+
[class*='sprk-o-Stack__item--fifth\@xl'],
220+
[class*='sprk-o-Stack__item--fourth\@xl'],
221+
[class*='sprk-o-Stack__item--third\@xl'],
222+
[class*='sprk-o-Stack__item--half\@xl'],
223+
[class*='sprk-o-Stack__item--three-fifths\@xl'],
224+
[class*='sprk-o-Stack__item--three-fourths\@xl'],
225+
[class*='sprk-o-Stack__item--two-fifths\@xl'] {
226+
@media all and (min-width: $split-breakpoint-xl) {
227+
margin: 0 !important;
228+
}
229+
}
230+
231+
//
232+
// Split at extra extra small breakpoint
233+
///
234+
.sprk-o-Stack--split\@xxs {
235+
@media all and (min-width: $split-breakpoint-xxs) {
236+
// At extra small breakpoint we switch from column to row
237+
flex-direction: row;
238+
239+
// Remove bottom margin in new row formation
240+
> .sprk-o-Stack__item {
241+
margin-bottom: 0;
242+
}
243+
244+
// Add spacing between items based on spacing size class
245+
&.sprk-o-Stack--tiny > .sprk-o-Stack__item {
246+
margin-right: $stack-spacing-tiny;
247+
}
248+
249+
&.sprk-o-Stack--small > .sprk-o-Stack__item {
250+
margin-right: $stack-spacing-small;
251+
}
252+
253+
&.sprk-o-Stack--medium > .sprk-o-Stack__item {
254+
margin-right: $stack-spacing-medium;
255+
}
256+
257+
&.sprk-o-Stack--large > .sprk-o-Stack__item {
258+
margin-right: $stack-spacing-large;
259+
}
260+
261+
&.sprk-o-Stack--huge > .sprk-o-Stack__item {
262+
margin-right: $stack-spacing-huge;
263+
}
264+
265+
> .sprk-o-Stack__item--sixth\@xxs {
266+
flex: 0 0 16.666666667%;
267+
max-width: 16.666666667%;
268+
}
269+
270+
> .sprk-o-Stack__item--fifth\@xxs {
271+
flex: 0 0 20%;
272+
max-width: 20%;
273+
}
274+
275+
> .sprk-o-Stack__item--fourth\@xxs {
276+
flex: 0 0 25%;
277+
max-width: 25%;
278+
}
279+
280+
> .sprk-o-Stack__item--third\@xxs {
281+
flex: 0 0 33.333333333%;
282+
max-width: 33.333333333%;
283+
}
284+
285+
> .sprk-o-Stack__item--half\@xxs {
286+
flex: 0 0 50%;
287+
max-width: 50%;
288+
}
289+
290+
> .sprk-o-Stack__item--three-fourths\@xxs {
291+
flex: 0 0 75%;
292+
max-width: 75%;
293+
}
294+
295+
> .sprk-o-Stack__item--three-fifths\@xxs {
296+
flex: 0 0 60%;
297+
max-width: 60%;
298+
}
299+
300+
> .sprk-o-Stack__item--two-fifths\@xxs {
301+
flex: 0 0 40%;
302+
max-width: 40%;
303+
}
304+
305+
// We want the last item to have zero margin on the right
306+
&.sprk-o-Stack--tiny > .sprk-o-Stack__item:last-child,
307+
&.sprk-o-Stack--small > .sprk-o-Stack__item:last-child,
308+
&.sprk-o-Stack--medium > .sprk-o-Stack__item:last-child,
309+
&.sprk-o-Stack--large > .sprk-o-Stack__item:last-child,
310+
&.sprk-o-Stack--huge > .sprk-o-Stack__item:last-child {
311+
margin-right: 0;
312+
}
313+
}
150314
}
151315

152316
//
@@ -577,6 +741,12 @@
577741
//
578742
// Stack items take up leftover space at specific breakpoints
579743
///
744+
.sprk-o-Stack__item--flex\@xxs {
745+
@media all and (min-width: $split-breakpoint-xxs) {
746+
flex: 1;
747+
}
748+
}
749+
580750
.sprk-o-Stack__item--flex\@xs {
581751
@media all and (min-width: $split-breakpoint-xs) {
582752
flex: 1;
@@ -612,6 +782,12 @@
612782
align-self: flex-end;
613783
}
614784

785+
.sprk-o-Stack__item--end-column\@xxs {
786+
@media all and (min-width: $split-breakpoint-xs) {
787+
align-self: flex-end;
788+
}
789+
}
790+
615791
.sprk-o-Stack__item--end-column\@xs {
616792
@media all and (min-width: $split-breakpoint-xs) {
617793
align-self: flex-end;
@@ -647,6 +823,12 @@
647823
align-self: flex-start;
648824
}
649825

826+
.sprk-o-Stack__item--start-column\@xxs {
827+
@media all and (min-width: $split-breakpoint-xxs) {
828+
align-self: flex-start;
829+
}
830+
}
831+
650832
.sprk-o-Stack__item--start-column\@xs {
651833
@media all and (min-width: $split-breakpoint-xs) {
652834
align-self: flex-start;
@@ -682,6 +864,12 @@
682864
align-self: center;
683865
}
684866

867+
.sprk-o-Stack__item--center-column\@xxs {
868+
@media all and (min-width: $split-breakpoint-xxs) {
869+
align-self: center;
870+
}
871+
}
872+
685873
.sprk-o-Stack__item--center-column\@xs {
686874
@media all and (min-width: $split-breakpoint-xs) {
687875
align-self: center;

packages/spark-core/package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/spark-core/settings/_settings.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,7 @@ $stack-spacing-small: $space-s !default;
428428
$stack-spacing-medium: $space-m !default;
429429
$stack-spacing-large: $space-l !default;
430430
$stack-spacing-huge: $space-xl !default;
431+
$split-breakpoint-xxs: 20rem !default;
431432
$split-breakpoint-xs: 30rem !default;
432433
$split-breakpoint-s: 42.5rem !default;
433434
$split-breakpoint-m: 55rem !default;

0 commit comments

Comments
 (0)