Skip to content

Commit 80f03df

Browse files
committed
Optimize code
1 parent 524ee9d commit 80f03df

2 files changed

Lines changed: 19 additions & 12 deletions

File tree

scss/layouts/_level.scss

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
display: flex;
99
justify-content: space-between;
1010
align-items: center;
11+
flex-wrap: nowrap;
1112

1213
&.is-top {
1314
align-items: flex-start;
@@ -22,30 +23,28 @@
2223
}
2324

2425
> .l-level__item {
25-
flex: 1;
26+
flex: 1 1 0%;
2627
text-align: center;
2728
}
2829
}
2930

3031
// elements
32+
.l-level__item {
33+
34+
}
35+
3136
.l-level__left,
37+
.l-level__center,
3238
.l-level__right {
3339
display: flex;
3440
align-items: center;
35-
36-
&.is-shrink {
37-
flex-shrink: 1;
38-
min-width: 0;
39-
}
40-
4141
&.is-top {
4242
align-items: flex-start;
4343
}
4444

4545
&.is-bottom {
4646
align-items: flex-end;
4747
}
48-
4948
> .l-level__item:not(:last-child) {
5049
margin-right: $level-item-margin-x;
5150
}
@@ -59,6 +58,7 @@
5958

6059
.l-level__center {
6160
order: 2;
61+
justify-content: center;
6262
}
6363

6464
.l-level__right {
@@ -67,6 +67,13 @@
6767
justify-content: flex-end;
6868
}
6969

70-
.l-level__item {
71-
70+
.l-level__left,
71+
.l-level__right {
72+
&.is-auto {
73+
flex: 1 1 auto;
74+
min-width: 0;
75+
}
76+
&.is-fixed {
77+
flex: none;
78+
}
7279
}

scss/mixins/_grid.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
@mixin make-container-max-widths() {
2727
@each $breakpoint, $container-max-width in $container-max-widths {
2828
@include media-breakpoint-up($breakpoint) {
29-
width: $container-max-width;
30-
max-width: 100%;
29+
max-width: $container-max-width;
30+
width: 100%;
3131
}
3232
}
3333
}

0 commit comments

Comments
 (0)