Skip to content

Commit e0e86c4

Browse files
authored
fix(client): update breadcrumb navigation (freeCodeCamp#40853)
1 parent a3a678b commit e0e86c4

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

client/src/templates/Challenges/components/Challenge-Title.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ function ChallengeTitle({ block, children, isCompleted, superBlock }) {
3232
{block}
3333
</Link>
3434
</div>
35-
<b>{children}</b>
35+
<div className='challenge-title'>
36+
<b>{children}</b>
37+
</div>
3638
{isCompleted ? (
3739
<GreenPass
3840
style={{ height: '15px', width: '15px', marginLeft: '7px' }}

client/src/templates/Challenges/components/__snapshots__/ChallengeTitle.test.js.snap

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@ exports[`<ChallengeTitle/> renders correctly 1`] = `
2828
}
2929
/>
3030
</div>
31-
<b>
32-
title text
33-
</b>
31+
<div
32+
className="challenge-title"
33+
>
34+
<b>
35+
title text
36+
</b>
37+
</div>
3438
<span
3539
className="sr-only"
3640
>

client/src/templates/Challenges/components/challenge-title.css

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22
text-align: center;
33
}
44

5+
.challenge-title {
6+
margin: 20px 0px 15px;
7+
}
8+
59
.challenge-title-breadcrumbs {
610
display: flex;
711
flex-direction: row;
812
justify-content: space-around;
913
font-size: 16px;
1014
margin-left: -10px;
1115
margin-right: -10px;
12-
border-bottom: 2px solid var(--secondary-color);
16+
border-bottom: 1px solid var(--quaternary-color);
1317
height: 25px;
1418
}
1519

@@ -32,7 +36,7 @@
3236
.breadcrumb-center {
3337
width: 0;
3438
height: 0;
35-
border-top: calc(23px / 2) solid transparent;
39+
border-top: calc(25px / 2) solid transparent;
3640
border-bottom: calc(23px / 2) solid transparent;
3741
border-left: calc(23px / 2) solid var(--quaternary-background);
3842
flex-grow: 0;
@@ -51,7 +55,6 @@
5155
word-wrap: none;
5256
overflow: hidden;
5357
text-overflow: ellipsis;
54-
max-height: 20px;
5558
white-space: nowrap;
5659
}
5760

@@ -60,9 +63,10 @@
6063
}
6164

6265
.breadcrumb-left:hover {
66+
text-decoration: underline;
6367
background-color: var(--quaternary-background);
6468
}
65-
6669
.breadcrumb-right:hover {
67-
background-color: rgba(0, 0, 0, 0);
70+
text-decoration: underline;
71+
background-color: var(--secondary-background);
6872
}

0 commit comments

Comments
 (0)