Skip to content

Commit 799e04f

Browse files
Fix deprecated scss in styls (#150)
1 parent 8611691 commit 799e04f

File tree

26 files changed

+318
-231
lines changed

26 files changed

+318
-231
lines changed

src/components/AmenityListing/AmenityListing.module.scss

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
@import '../../styles/base.scss';
1+
@use '../../styles/base.scss';
22

33
$icon-wrapper-size: 2em;
44

55
.amenityListing {
66
padding: 0;
77
margin: 0;
88
list-style-type: none;
9-
& > *:not(:last-child) {
9+
10+
&>*:not(:last-child) {
1011
margin-bottom: 0.5em;
1112
}
1213
}
@@ -24,21 +25,23 @@ $icon-wrapper-size: 2em;
2425
justify-content: center;
2526
width: $icon-wrapper-size;
2627
height: $icon-wrapper-size;
27-
border-radius: $icon-wrapper-size / 2;
28+
border-radius: calc($icon-wrapper-size / 2);
2829
background: #bbb;
2930
box-sizing: border-box;
3031

31-
@include mobile {
32+
@include base.mobile {
3233
align-self: flex-start;
3334
}
3435

3536
&:global(.present) {
36-
background: $rr-gold;
37-
& > :global(.slash) {
37+
background: base.$rr-gold;
38+
39+
&> :global(.slash) {
3840
display: none;
3941
}
4042
}
41-
& > :global(.slash) {
43+
44+
&> :global(.slash) {
4245
position: absolute;
4346
background: white;
4447
width: 2px;

src/components/AppFrame/AppFrame.module.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
@import '../../styles/base.scss';
1+
@use '../../styles/base.scss';
22

33
.appFrame {
44
display: flex;
55
flex-direction: column;
66
min-height: 100vh;
77

8-
@include mobile {
8+
@include base.mobile {
99
font-size: 15px;
1010
}
1111
}
@@ -15,12 +15,12 @@
1515
align-items: center;
1616
height: 60px;
1717
padding: 0 10px;
18-
background: $rr-purple-secondary;
18+
background: base.$rr-purple-secondary;
1919
color: white;
2020
overflow: hidden;
2121
z-index: 2;
2222

23-
@include mobile {
23+
@include base.mobile {
2424
flex-direction: column;
2525
align-items: flex-start;
2626
padding: 10px;

src/components/Button/Button.module.scss

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '../../styles/base.scss';
1+
@use '../../styles/base.scss';
22

33
.button {
44
display: flex;
@@ -11,7 +11,7 @@
1111
margin: 0; // unset Safari
1212
cursor: pointer;
1313
background: whitesmoke;
14-
box-shadow: $global-shadow;
14+
box-shadow: base.$global-shadow;
1515
font-size: 0.9em;
1616
color: #111;
1717

@@ -20,7 +20,8 @@
2020
color: whitesmoke;
2121
border: 2px solid rgba(white, 0.8);
2222
padding: 3px 8px;
23-
svg > * {
23+
24+
svg>* {
2425
stroke: currentColor;
2526
}
2627
}
@@ -39,18 +40,18 @@
3940
padding: 8 16px;
4041
}
4142

42-
> .icon {
43+
>.icon {
4344
display: flex;
4445
padding-right: 0.25em;
4546
}
4647

47-
> .rightIcon {
48+
>.rightIcon {
4849
display: flex;
4950
margin-left: auto;
5051
padding-left: 0.25em;
5152
}
5253

53-
& > * {
54+
&>* {
5455
min-height: 1em;
5556
}
5657
}

src/components/DeparturePicker/DeparturePicker.module.scss

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
@import 'styles/base.scss';
1+
@use 'styles/base.scss';
22

3-
$top-color: $rr-gold;
4-
$bottom-color: $rr-purple-secondary;
3+
$top-color: base.$rr-gold;
4+
$bottom-color: base.$rr-purple-secondary;
55

66
@mixin picker-triangle($color, $size: 8px) {
77
position: absolute;
88
z-index: 2;
99
left: -$size;
10-
@include triangle($color, $size);
10+
@include base.triangle($color, $size);
1111
}
1212

1313
.departurePicker {
@@ -17,6 +17,7 @@ $bottom-color: $rr-purple-secondary;
1717

1818
&:not(.disabled):hover {
1919
cursor: pointer;
20+
2021
.cursor {
2122
opacity: 1;
2223
}
@@ -40,7 +41,7 @@ $bottom-color: $rr-purple-secondary;
4041
.top {
4142
width: 100%;
4243
height: 8px;
43-
box-shadow: $global-shadow;
44+
box-shadow: base.$global-shadow;
4445
background: $top-color;
4546
box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1);
4647
}
@@ -51,9 +52,10 @@ $bottom-color: $rr-purple-secondary;
5152
margin-top: 20px;
5253
background: $bottom-color;
5354
box-shadow: 0px -1px 2px rgba(0, 0, 0, 0.1);
54-
@include mobile {
55+
56+
@include base.mobile {
5557
background: $top-color;
56-
box-shadow: $global-shadow;
58+
box-shadow: base.$global-shadow;
5759
}
5860
}
5961

@@ -75,6 +77,7 @@ $bottom-color: $rr-purple-secondary;
7577
position: absolute;
7678
color: #333;
7779
user-select: none;
80+
7881
.cursorNeedle {
7982
position: absolute;
8083
bottom: 0;
@@ -83,6 +86,7 @@ $bottom-color: $rr-purple-secondary;
8386
left: -1px;
8487
background: currentColor;
8588
}
89+
8690
.cursorTime {
8791
position: absolute;
8892
bottom: 0;
@@ -92,12 +96,10 @@ $bottom-color: $rr-purple-secondary;
9296
z-index: -1;
9397
font-size: 0.8em;
9498
white-space: nowrap;
95-
background: linear-gradient(
96-
90deg,
97-
rgba(255, 255, 255, 1) 0%,
98-
rgba(255, 255, 255, 1) 90%,
99-
rgba(255, 255, 255, 0) 100%
100-
);
99+
background: linear-gradient(90deg,
100+
rgba(255, 255, 255, 1) 0%,
101+
rgba(255, 255, 255, 1) 90%,
102+
rgba(255, 255, 255, 0) 100%);
101103
}
102104
}
103105

@@ -131,7 +133,8 @@ $bottom-color: $rr-purple-secondary;
131133
.bottomTriangle {
132134
@include picker-triangle($bottom-color);
133135
bottom: 0;
134-
@include mobile {
136+
137+
@include base.mobile {
135138
@include picker-triangle($top-color);
136139
}
137140
}

src/components/Explorer/Explorer.module.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '../../styles/base.scss';
1+
@use '../../styles/base.scss';
22

33
.explorer {
44
display: flex;
@@ -10,11 +10,11 @@
1010
display: flex;
1111
align-items: center;
1212
justify-content: center;
13-
color: $rr-purple;
13+
color: base.$rr-purple;
1414
}
1515

1616
.footer {
17-
background: $darker-rr-purple;
17+
background: base.$darker-rr-purple;
1818
}
1919

2020
.footerInner {
@@ -32,7 +32,7 @@
3232
margin-bottom: 40px;
3333
}
3434

35-
@include mobile {
35+
@include base.mobile {
3636
width: calc(100% - 40px);
3737
}
3838
}

src/components/FrequencyHistogram/FrequencyHistogram.module.scss

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '../../styles/base.scss';
1+
@use '../../styles/base.scss';
22

33
$arrival-width: 25px;
44

@@ -17,11 +17,12 @@ $arrival-width: 25px;
1717
align-items: center;
1818
flex-grow: 1;
1919
border-right: 1px solid #ddd;
20+
2021
&:first-child {
2122
border-left: 1px solid #ddd;
2223
}
2324

24-
:global .time {
25+
:global(.time) {
2526
user-select: none;
2627
position: absolute;
2728
bottom: -5px;
@@ -35,18 +36,18 @@ $arrival-width: 25px;
3536
@mixin arrival {
3637
width: $arrival-width;
3738
height: $arrival-width;
38-
border-radius: #{$arrival-width / 2};
39+
border-radius: calc($arrival-width / 2);
3940
margin-bottom: 5px;
4041
box-sizing: border-box;
4142
}
4243

4344
.arrival {
4445
@include arrival;
45-
background: $rr-purple;
46-
border: #{$arrival-width / 4} solid $rr-light;
46+
background: base.$rr-purple;
47+
border: calc($arrival-width / 4) solid base.$rr-light;
4748
}
4849

4950
.enhancedArrival {
5051
@include arrival;
51-
background: $rr-purple;
52+
background: base.$rr-purple;
5253
}

src/components/FrequencyTimeline/FrequencyTimeline.module.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '../../styles/base.scss';
1+
@use '../../styles/base.scss';
22

33
$arrival-width: 8px;
44
$mobile-arrival-width: 6px;
@@ -38,7 +38,7 @@ $mobile-arrival-width: 6px;
3838
white-space: nowrap;
3939
user-select: none;
4040

41-
@include mobile {
41+
@include base.mobile {
4242
font-size: 10px;
4343
}
4444
}
@@ -62,18 +62,18 @@ $mobile-arrival-width: 6px;
6262
margin-bottom: 5px;
6363
box-sizing: border-box;
6464

65-
@include mobile {
65+
@include base.mobile {
6666
width: $mobile-arrival-width;
6767
height: $mobile-arrival-width;
6868
}
6969
}
7070

7171
.baselineArrival {
72+
background: base.$rr-light;
7273
@include arrival;
73-
background: $rr-light;
7474
}
7575

7676
.enhancedArrival {
77+
background: base.$rr-purple;
7778
@include arrival;
78-
background: $rr-purple;
7979
}

0 commit comments

Comments
 (0)