Skip to content

Commit 5df51f2

Browse files
fix: fixed hover color issue throughout MFE (#644)
* fix: fixed hover color issue throughout MFE * fix: added border around add comment button * fix: removed add button radius
1 parent 92adec3 commit 5df51f2

File tree

8 files changed

+49
-34
lines changed

8 files changed

+49
-34
lines changed

src/components/NavigationBar/CourseTabsNavigation.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const CourseTabsNavigation = ({
2424
}, [courseId]);
2525

2626
return (
27-
<div id="courseTabsNavigation" className={classNames('course-tabs-navigation px-4', className)}>
27+
<div id="courseTabsNavigation" className={classNames('course-tabs-navigation px-4 bg-white', className)}>
2828
{!!tabs.length && (
2929
<Tabs
3030
className="nav-underline-tabs"

src/discussions/common/AuthorLabel.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ const AuthorLabel = ({
116116
data-testid="learner-posts-link"
117117
id="learner-posts-link"
118118
to={generatePath(Routes.LEARNERS.POSTS, { learnerUsername: author, courseId })}
119-
className="text-decoration-none"
119+
className="text-decoration-none text-reset"
120120
style={{ width: 'fit-content' }}
121121
>
122122
{!alert && authorName}

src/discussions/common/HoverCard.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const HoverCard = ({
3535

3636
return (
3737
<div
38-
className="flex-fill justify-content-end align-items-center hover-card mr-n4 position-absolute"
38+
className="flex-fill justify-content-end align-items-center hover-card bg-white mr-n4 position-absolute"
3939
data-testid={`hover-card-${id}`}
4040
id={`hover-card-${id}`}
4141
>

src/discussions/discussions-home/DiscussionsHome.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const DiscussionsHome = () => {
7878
<main className="container-fluid d-flex flex-column p-0 w-100" id="main" tabIndex="-1">
7979
{!enableInContextSidebar && <CourseTabsNavigation activeTab="discussion" courseId={courseId} />}
8080
<div
81-
className={classNames('header-action-bar', {
81+
className={classNames('header-action-bar bg-white position-sticky', {
8282
'shadow-none border-light-300 border-bottom': enableInContextSidebar,
8383
})}
8484
ref={postActionBarRef}

src/discussions/post-comments/PostCommentsView.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const PostCommentsView = () => {
115115
)
116116
)}
117117
<div
118-
className="discussion-comments d-flex flex-column card border-0 post-card-margin post-card-padding on-focus"
118+
className="discussion-comments d-flex flex-column card border-0 post-card-margin post-card-padding on-focus mx-4 mt-4 mb-0"
119119
>
120120
<Post handleAddResponseButton={handleAddResponseButton} />
121121
{!closed && (

src/discussions/post-comments/comments/CommentsView.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const CommentsView = ({ endorsed }) => {
3636

3737
const handleDefinition = useCallback((message, commentsLength) => (
3838
<div
39-
className="comment-line mx-4 my-14px text-gray-700 font-style"
39+
className="comment-line line-height-24 mx-4 my-14px text-gray-700 font-style"
4040
role="heading"
4141
aria-level="2"
4242
>

src/discussions/post-comments/comments/comment/Comment.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ const Comment = ({
267267
) : (
268268
!isClosed && isUserPrivilegedInPostingRestriction && (inlineReplies.length >= 5) && (
269269
<Button
270-
className="d-flex flex-grow mt-2 font-size-14 font-style font-weight-500 text-primary-500"
270+
className="d-flex flex-grow mt-2 font-size-14 font-style font-weight-500 text-primary-500 add-comment-btn rounded-0"
271271
variant="plain"
272272
style={{ height: '36px' }}
273273
onClick={handleAddCommentReply}

src/index.scss

Lines changed: 42 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,23 @@ $fa-font-path: "~font-awesome/fonts";
2222
}
2323

2424
.text-staff-color {
25-
color: #998200;
25+
color: $warning-700;
2626
}
2727

2828
.outline-staff-color {
29-
outline: #998200 solid 2px;
29+
outline: $warning-700 solid 2px;
3030
}
3131

3232
.text-TA-color {
33-
color: #175B3C;
33+
color: $success-700;
3434
}
3535

3636
.outline-TA-color {
37-
outline: #175B3C solid 2px;
37+
outline: $success-700 solid 2px;
3838
}
3939

4040
.outline-anonymous {
41-
outline: #EAE6E5 solid 2px;
41+
outline: $light-400 solid 2px;
4242
}
4343

4444
.font-size-16 {
@@ -170,7 +170,7 @@ $fa-font-path: "~font-awesome/fonts";
170170
}
171171

172172
.learner > a:hover {
173-
background-color: #F2F0EF;
173+
background-color: $light-300;
174174
}
175175

176176
.py-10px {
@@ -227,8 +227,6 @@ header {
227227
}
228228

229229
#learner-posts-link {
230-
color: inherit;
231-
232230
span[role=heading]:hover {
233231
text-decoration: underline;
234232
}
@@ -310,7 +308,6 @@ header {
310308
#courseTabsNavigation {
311309
font-size: 18px !important;
312310
z-index: 3;
313-
background-color: #fff;
314311

315312
.container-xl {
316313
font-size: 1.125rem;
@@ -330,10 +327,8 @@ header {
330327
}
331328

332329
.header-action-bar {
333-
background-color: #fff;
334330
z-index: 2 !important;
335331
box-shadow: 0px 2px 4px rgb(0 0 0 / 15%), 0px 2px 8px rgb(0 0 0 / 15%);
336-
position: sticky;
337332
top: 0;
338333

339334
.nav-button-group{
@@ -378,8 +373,8 @@ header {
378373
}
379374

380375
.btn-icon.btn-icon-primary:hover {
381-
background-color: #F2F0EF !important;
382-
color: #00262B !important
376+
background-color: $light-300 !important;
377+
color: $primary-500 !important
383378
}
384379

385380

@@ -405,19 +400,14 @@ header {
405400
padding: 24px 24px 10px 24px;
406401
}
407402

408-
.post-card-margin {
409-
margin: 24px 24px 0px 24px;
410-
}
411-
412403
.hover-card {
413404
height: 36px !important;
414405
box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.15), 0px 4px 10px rgba(0, 0, 0, 0.15);
415406
border-radius: 3px;
416-
background: #FFFFFF;
417407
max-width: fit-content !important;
418408
margin-left: auto;
419409
margin-top: -2.063rem;
420-
z-index: 2;
410+
z-index: 1;
421411
right: 32px;
422412
}
423413

@@ -426,18 +416,39 @@ header {
426416
}
427417

428418
.hover-button:hover {
429-
background-color: #F2F0EF !important;
419+
background-color: $light-300 !important;
430420
height: 36px !important;
431-
border: none;
421+
border: none !important;
432422
}
433423

434424
.btn-tertiary:hover {
435-
background-color: #F2F0EF;
425+
background-color: $light-300 !important;
426+
}
427+
428+
.nav-button-group {
429+
.nav-link {
430+
&:hover {
431+
background-color: $light-300 !important;
432+
}
433+
}
434+
435+
.nav-link.active,
436+
.show>.nav-link {
437+
background-color: $primary-500 !important;
438+
}
439+
}
440+
441+
.course-tabs-navigation {
442+
.nav a {
443+
&:hover {
444+
background-color: $light-300 !important;;
445+
}
446+
}
436447
}
437448

438449
.btn-tertiary:disabled {
439-
color: #454545;
440-
background-color: transparent;
450+
color: $gray-700 !important;
451+
background-color: transparent !important;
441452
}
442453

443454
.disable-div {
@@ -488,12 +499,12 @@ header {
488499
}
489500

490501
.line-height-24 {
491-
line-height: 24px;
502+
line-height: 24px !important;
492503
}
493504

494505
.comments-sort {
495506
margin-bottom: -44px;
496-
z-index: 1;
507+
z-index: 0;
497508
}
498509

499510
.comment-line {
@@ -504,12 +515,16 @@ header {
504515
.post-preview,
505516
.discussion-comments {
506517
blockquote {
507-
border-left: 2px solid #ccc;
518+
border-left: 2px solid $gray-200;
508519
margin-left: 1.5rem;
509520
padding-left: 1rem;
510521
}
511522
}
512523

524+
.add-comment-btn {
525+
border: 1px solid $light-300 !important;
526+
}
527+
513528
.icon-size-24 {
514529
width: 1.5rem !important;
515530
height: 1.5rem !important;

0 commit comments

Comments
 (0)