Skip to content

Commit 05ab5ef

Browse files
Put border on answers in Result component
To avoid using the same as the background color on hover, it's additionally put on a white background. The border is implemented with a relative value of the neutral-light color. Part of XI-6385
1 parent d5b1886 commit 05ab5ef

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

src/components/Result.module.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
@include variables.font-s;
2626

2727
&:hover {
28-
background-color: hsl(0, 0%, 99%);
28+
background-color: variables.$neutral-light;
2929
}
3030
}
3131

@@ -54,6 +54,7 @@
5454
.chevronIcon {
5555
color: variables.$neutral-dark;
5656
@include variables.font-s;
57+
cursor: pointer;
5758
}
5859

5960
.correctIcon {

src/components/ResultViewer.module.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,26 @@
4545
margin: 5px 0;
4646
box-sizing: border-box;
4747
flex-wrap: nowrap;
48-
background-color: variables.$neutral-light;
48+
background-color: white;
49+
border: 1px solid;
50+
border-color: variables.$border-neutral;
4951

5052
&.selected {
5153
font-weight: bold;
54+
55+
.icon {
56+
color: variables.$neutral-dark;
57+
}
5258
}
5359

5460
&.correct {
5561
background-color: variables.$success-light;
62+
border-color: variables.$success;
5663
}
5764

5865
&.wrong {
5966
background-color: variables.$danger-light;
67+
border-color: variables.$danger;
6068
}
6169

6270
.icon {

src/variables.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ $neutral: var(--qr-color-neutral, hsl(0, 0%, 45%));
55
$neutral-light: var(--qr-color-neutral-light, hsl(0, 0%, 96%));
66
$neutral-dark: var(--qr-color-neutral-dark, hsl(0, 0%, 32%));
77

8+
$border-neutral: hsl(from $neutral-light h s 80%);
9+
810
$success: var(--qr-color-success, hsl(142, 71%, 45%));
911
$success-light: var(--qr-color-success-light, hsl(142, 77%, 73%));
1012
$success-dark: var(--qr-color-success-dark, hsl(142, 76%, 36%));

0 commit comments

Comments
 (0)