Skip to content

Commit 5e8eee9

Browse files
committed
improvement(reskin): challenge listing part 4 f2f
1 parent 0fd3a4e commit 5e8eee9

File tree

4 files changed

+67
-62
lines changed

4 files changed

+67
-62
lines changed

src/shared/components/SortingSelectBar/style.scss

Lines changed: 47 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -46,54 +46,7 @@ $down-arrow-size: $base-unit;
4646
@include xs-to-md {
4747
margin-right: 16px;
4848
}
49-
}
50-
51-
.view-options {
52-
position: absolute;
53-
right: $view-options-toggle-right-margin;
54-
top: $base-unit * 10;
55-
z-index: 1;
56-
background: $tc-white;
57-
border-radius: $base-unit;
58-
padding: $base-unit;
59-
box-shadow: 1px 5px 15px $tc-gray-20;
60-
display: flex;
61-
flex-direction: column;
62-
}
63-
64-
.view-option {
65-
@extend %sorting-select-button;
66-
67-
font-weight: 300;
68-
font-size: 12px;
69-
padding: $base-unit * 2;
70-
outline: none;
71-
border: 0;
72-
color: $tc-black;
73-
text-align: left;
74-
}
75-
76-
.view-options-toggle {
77-
@extend %sorting-select-button;
78-
79-
display: flex;
80-
align-items: center;
81-
color: $tc-gray-90;
82-
border: 1px solid $tc-gray-neutral-dark;
83-
font-size: 12px;
84-
outline: none;
85-
}
86-
87-
.down-arrow {
88-
width: 0;
89-
height: 0;
90-
border-left: $down-arrow-size solid transparent;
91-
border-right: $down-arrow-size solid transparent;
92-
border-top: $down-arrow-size solid $tc-gray-50;
93-
margin-left: 3 * $base-unit;
94-
}
95-
96-
:global {
49+
:global {
9750
// 'Sort by' dropdown
9851
.Select {
9952
@include roboto-regular;
@@ -230,4 +183,50 @@ $down-arrow-size: $base-unit;
230183
padding: 8px 20px;
231184
}
232185
}
186+
}
187+
188+
.view-options {
189+
position: absolute;
190+
right: $view-options-toggle-right-margin;
191+
top: $base-unit * 10;
192+
z-index: 1;
193+
background: $tc-white;
194+
border-radius: $base-unit;
195+
padding: $base-unit;
196+
box-shadow: 1px 5px 15px $tc-gray-20;
197+
display: flex;
198+
flex-direction: column;
199+
}
200+
201+
.view-option {
202+
@extend %sorting-select-button;
203+
204+
font-weight: 300;
205+
font-size: 12px;
206+
padding: $base-unit * 2;
207+
outline: none;
208+
border: 0;
209+
color: $tc-black;
210+
text-align: left;
211+
}
212+
213+
.view-options-toggle {
214+
@extend %sorting-select-button;
215+
216+
display: flex;
217+
align-items: center;
218+
color: $tc-gray-90;
219+
border: 1px solid $tc-gray-neutral-dark;
220+
font-size: 12px;
221+
outline: none;
222+
}
223+
224+
.down-arrow {
225+
width: 0;
226+
height: 0;
227+
border-left: $down-arrow-size solid transparent;
228+
border-right: $down-arrow-size solid transparent;
229+
border-top: $down-arrow-size solid $tc-gray-50;
230+
margin-left: 3 * $base-unit;
231+
}
233232
}

src/shared/components/Tooltip/style.scss

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,28 @@
1313
padding: 0;
1414
}
1515

16+
.rc-tooltip-arrow {
17+
background: url(assets/images/tooltip-arrow.svg);
18+
width: 30px;
19+
height: 9px;
20+
z-index: 10000;
21+
}
22+
1623
.rc-tooltip-placement-top .rc-tooltip-arrow,
1724
.rc-tooltip-placement-topLeft .rc-tooltip-arrow,
1825
.rc-tooltip-placement-topRight .rc-tooltip-arrow {
1926
border-top-color: $tc-gray-80;
20-
background: url(assets/images/tooltip-arrow.svg);
27+
padding: 0;
28+
bottom: 1px;
29+
border-width: 0;
30+
}
31+
32+
.rc-tooltip-placement-top .rc-tooltip-arrow {
33+
margin-left: -19px;
34+
}
35+
36+
.rc-tooltip-placement-topLeft .rc-tooltip-arrow {
37+
margin-left: -13px;
2138
}
2239

2340
.rc-tooltip-placement-right .rc-tooltip-arrow,

src/shared/components/challenge-listing/Tooltips/ProgressBarTooltip/style.scss

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,6 @@ $tip-space-95: $base-unit * 19;
88
$tip-radius-15: $corner-radius * 7 + 1;
99
$tip-radius-4: $corner-radius * 2;
1010

11-
:global {
12-
.rc-tooltip-arrow {
13-
background-color: url(assets/images/tooltip-arrow.svg);
14-
width: 30px;
15-
height: 9px;
16-
position: absolute;
17-
left: 41% !important;
18-
z-index: 10000;
19-
bottom: 0 !important;
20-
border: 0;
21-
}
22-
}
23-
2411
div.progress-bar-tooltip {
2512
@include roboto-regular;
2613

src/shared/components/challenge-listing/Tooltips/TrackAbbreviationTooltip/index.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ Tip.propTypes = {
4141
};
4242

4343
function placeArrow(TooltipNode) {
44+
const rootLeftPos = parseInt(TooltipNode.style.left, 10);
45+
TooltipNode.style.left = `${rootLeftPos - 5}px`; // eslint-disable-line no-param-reassign
4446
const arrow = TooltipNode.querySelector('.rc-tooltip-arrow');
4547
arrow.style.left = '15px';
4648
}

0 commit comments

Comments
 (0)