Skip to content

Commit 8983465

Browse files
committed
Add bottom line to navtabs
1 parent 804f20a commit 8983465

File tree

1 file changed

+47
-72
lines changed

1 file changed

+47
-72
lines changed
Lines changed: 47 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,57 @@
11
@import '~styles/utils/modules-entry.scss';
22

3+
$divider-margin: 0.3rem;
4+
35
/*
46
For breakpoint-md (tablets), show the links as compact buttons with labels below icons.
57
For breakpoint-lg (desktop), show the links as traditional link with icon to the left.
68
TODO: UPDATE COMMENT
79
*/
810
.nav {
9-
// position: fixed;
10-
// top: $navbar-height;
11-
z-index: $navtabs-z-index;
12-
// See site.scss for width on md and lg sizes
11+
// z-index: $navtabs-z-index; // TODO: Remove from main z-index list if no longer neeedd
1312
display: flex;
14-
// justify-content: space-around;
1513
justify-content: center;
1614
align-items: stretch;
1715
height: $navtab-height;
1816
margin: 0 auto;
1917
}
2018

2119
.link {
22-
position: relative;
23-
flex-shrink: 0;
24-
flex-basis: auto;
2520
line-height: 1.6;
26-
text-align: center;
21+
display: flex;
22+
justify-content: center;
23+
align-items: center;
24+
flex-grow: 1;
2725
color: var(--gray-light);
28-
transition: color 0.15s;
29-
min-width: 6em;
26+
min-width: 4rem;
27+
margin: 0 0.2rem;
28+
border-top: 0.2rem solid transparent;
29+
border-bottom: 0.2rem solid transparent;
30+
31+
transition: color $desktop-entering-duration $material-deceleration-curve,
32+
border-bottom-color $desktop-entering-duration $material-deceleration-curve;
3033

3134
&.linkActive {
3235
color: theme-color(primary);
36+
border-bottom-color: theme-color(primary);
3337
}
3438

35-
&:hover .title {
36-
text-decoration: underline;
37-
}
38-
39-
@include media-breakpoint-down(sm) {
40-
display: flex;
41-
justify-content: center;
42-
align-items: center;
43-
flex-grow: 1;
44-
min-width: unset;
45-
46-
svg {
47-
margin-bottom: 0.1rem;
39+
&:hover {
40+
&:not(.linkActive) {
41+
border-bottom-color: rgba(theme-color(primary), 0.3);
4842
}
4943
}
5044

51-
// @include media-breakpoint-up(md) {
52-
// padding: 0.8rem 0.5rem;
53-
// }
54-
55-
@include media-breakpoint-up(xl) {
56-
display: flex;
57-
align-items: center;
58-
justify-items: center;
59-
// padding: 0.8rem 0 0.8rem 2rem;
60-
text-align: left;
61-
min-width: 10em;
45+
svg {
46+
margin-bottom: 0.1rem;
6247
}
6348
}
6449

6550
.title {
6651
display: none;
6752
font-size: 0.7rem;
68-
69-
@include media-breakpoint-up(md) {
70-
display: block;
71-
}
72-
73-
@include media-breakpoint-up(xl) {
74-
margin-left: 0.4rem;
75-
font-size: 1rem;
76-
}
53+
margin-left: 0.4rem;
54+
font-size: 1rem;
7755
}
7856

7957
.hiddenOnMobile {
@@ -82,42 +60,39 @@
8260
}
8361
}
8462

85-
.divider {
86-
$size: 70%;
87-
$margin: 0.3rem;
63+
// TODO: To be resurrected in dropdown
64+
// .divider {
65+
// $size: 70%;
8866

89-
composes: hiddenOnMobile;
90-
opacity: 0.6;
91-
flex: 0 0 1px;
92-
margin: $margin ((100% - $size) / 2) 0;
93-
background: var(--gray-lighter);
67+
// composes: hiddenOnMobile;
68+
// opacity: 0.6;
69+
// flex: 0 0 1px;
70+
// margin: $divider-margin ((100% - $size) / 2) 0;
71+
// background: var(--gray-lighter);
72+
// }
9473

95-
@include media-breakpoint-up(xl) {
96-
margin: $margin 1rem $margin 1.4rem;
74+
@include media-breakpoint-down(sm) {
75+
.link {
76+
min-width: unset;
9777
}
9878
}
9979

100-
.updateDot {
101-
position: absolute;
102-
top: 0.5rem;
103-
width: 0.5rem;
104-
height: 0.5rem;
105-
padding: 0;
106-
margin-left: 1rem;
107-
border-radius: 50%;
108-
font-size: $font-size-xs;
109-
line-height: 1.2;
110-
background: theme-color(success);
111-
112-
:global {
113-
animation: zoomIn 0.4s;
80+
@include media-breakpoint-up(lg) {
81+
.link {
82+
min-width: 8em;
11483
}
11584

116-
@include media-breakpoint-up(md) {
117-
right: 1.4rem;
85+
.title {
86+
display: block;
11887
}
11988

120-
@include media-breakpoint-up(xl) {
121-
display: none;
89+
// .divider {
90+
// margin: $divider-margin 1rem $divider-margin 1.4rem;
91+
// }
92+
}
93+
94+
@include media-breakpoint-up(xl) {
95+
.link {
96+
min-width: 10em;
12297
}
12398
}

0 commit comments

Comments
 (0)