Skip to content

Commit eb82968

Browse files
shanraufcatarak
authored andcommitted
Fix hover effect on Log in and Sign up nav items (#1085)
* Fix hover effect on Log in and Sign up nav items * Fix Login and Signup unequal spacing * Fix HTML syntax and right nav__item-header hover
1 parent 60a3197 commit eb82968

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

client/components/Nav.jsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -530,12 +530,16 @@ class Nav extends React.PureComponent {
530530
</ul>
531531
{ __process.env.LOGIN_ENABLED && !this.props.user.authenticated &&
532532
<ul className="nav__items-right" title="user-menu">
533-
<li className="nav__item">
534-
<p>
535-
<Link to="/login">Log in</Link>
536-
<span className="nav__item-spacer">or</span>
537-
<Link to="/signup">Sign up</Link>
538-
</p>
533+
<li>
534+
<Link to="/login">
535+
<span className="nav__item-header">Log in</span>
536+
</Link>
537+
</li>
538+
<span className="nav__item-spacer">or</span>
539+
<li>
540+
<Link to="/signup">
541+
<span className="nav__item-header">Sign up</span>
542+
</Link>
539543
</li>
540544
</ul>}
541545
{ __process.env.LOGIN_ENABLED && this.props.user.authenticated &&

client/styles/components/_nav.scss

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@
5151
padding-right: #{15 / $base-font-size}rem;
5252
}
5353

54-
.nav__item-header {
55-
margin-right: #{5 / $base-font-size}rem;
56-
}
57-
5854
.nav__item:hover {
5955
.nav__item-header {
6056
@include themify() {
@@ -69,6 +65,16 @@
6965
}
7066
}
7167

68+
.nav__item-header:hover {
69+
@include themify() {
70+
color: getThemifyVariable('nav-hover-color');
71+
}
72+
}
73+
74+
.nav__item-header-triangle {
75+
margin-left: #{5 / $base-font-size}rem;
76+
}
77+
7278
.nav__dropdown {
7379
@include themify() {
7480
background-color: map-get($theme-map, 'modal-background-color');

0 commit comments

Comments
 (0)