Skip to content

Commit b189207

Browse files
OpenStaxClaudeclaudeCopilot
authored andcommitted
WIP: Add NavBar plain CSS file for CORE-1701 migration
- Create NavBar.css with all styled-components converted to plain CSS - Includes fadeIn animation, responsive breakpoints, z-index management - Uses CSS variables for theme values (colors, spacing, z-indices) - Follows PLAIN_CSS_MIGRATION_GUIDE patterns Related to CORE-1701 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Co-Authored-By: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 470fb66 commit b189207

1 file changed

Lines changed: 232 additions & 0 deletions

File tree

Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
/* NavBar Component Styles - Migrated from styled-components to plain CSS */
2+
3+
/* Keyframe animations */
4+
@keyframes fadeIn {
5+
0% {
6+
opacity: 0;
7+
}
8+
9+
100% {
10+
opacity: 1;
11+
}
12+
}
13+
14+
/* BarWrapper - Main navbar container */
15+
.navbar-bar-wrapper {
16+
overflow: visible;
17+
z-index: var(--navbar-z-index, 30);
18+
background: var(--navbar-bg, #fff);
19+
position: relative;
20+
padding: 0 var(--navbar-padding-desktop, 3.2rem);
21+
box-shadow: 0 0.2rem 0.2rem 0 rgba(0, 0, 0, 0.1);
22+
}
23+
24+
@media print {
25+
.navbar-bar-wrapper {
26+
display: none;
27+
}
28+
}
29+
30+
@media screen and (max-width: 75em) {
31+
.navbar-bar-wrapper {
32+
padding: 0 var(--navbar-padding-mobile, 1.6rem);
33+
}
34+
}
35+
36+
/* TopBar - Inner navbar container with flex layout */
37+
.navbar-topbar {
38+
overflow: visible;
39+
display: flex;
40+
justify-content: space-between;
41+
align-items: center;
42+
height: var(--navbar-height-desktop, 6rem);
43+
max-width: var(--navbar-max-width, 128rem);
44+
margin: 0 auto;
45+
}
46+
47+
@media screen and (max-width: 75em) {
48+
.navbar-topbar {
49+
height: var(--navbar-height-mobile, 5.2rem);
50+
}
51+
}
52+
53+
@media print {
54+
.navbar-topbar {
55+
display: none;
56+
}
57+
}
58+
59+
/* HeaderImage - Logo image */
60+
.navbar-header-image {
61+
display: block;
62+
width: auto;
63+
height: var(--navbar-logo-height-desktop, 3.5rem);
64+
}
65+
66+
@media screen and (max-width: 75em) {
67+
.navbar-header-image {
68+
height: var(--navbar-logo-height-mobile, 2.8rem);
69+
}
70+
}
71+
72+
/* Link - Login/nav links */
73+
.navbar-link {
74+
display: block;
75+
letter-spacing: -0.072rem;
76+
font-size: 1.8rem;
77+
text-decoration: none;
78+
font-weight: bold;
79+
padding: 1rem 0;
80+
color: var(--nav-text-color, #5f6163);
81+
animation: 100ms fadeIn ease-out;
82+
}
83+
84+
.navbar-link:hover,
85+
.navbar-link:active,
86+
.navbar-link:focus {
87+
color: var(--nav-text-hover, #424242);
88+
padding-bottom: 0.6rem;
89+
border-bottom: 0.4rem solid var(--nav-border-color, #63a524);
90+
}
91+
92+
@media screen and (max-width: 75em) {
93+
.navbar-link {
94+
font-size: 1.4rem;
95+
letter-spacing: 0.02rem;
96+
padding: 0.7rem 0;
97+
}
98+
99+
.navbar-link:hover,
100+
.navbar-link:active,
101+
.navbar-link:focus {
102+
padding: 0.7rem 0;
103+
border-bottom: none;
104+
}
105+
}
106+
107+
/* DropdownContainer - User profile dropdown container */
108+
.navbar-dropdown-container {
109+
animation: 100ms fadeIn ease-out;
110+
overflow: visible;
111+
position: relative;
112+
height: 100%;
113+
display: flex;
114+
align-items: center;
115+
}
116+
117+
@media screen and (max-width: 75em) {
118+
.navbar-dropdown-container {
119+
height: auto;
120+
}
121+
}
122+
123+
/* Mobile Menu Overlay */
124+
.navbar-mobile-menu-overlay {
125+
position: fixed;
126+
top: 0;
127+
left: 0;
128+
right: 0;
129+
bottom: 0;
130+
background: var(--mobile-overlay-bg, rgba(255, 255, 255, 0.98));
131+
z-index: var(--mobile-overlay-z-index, 31);
132+
}
133+
134+
/* Mobile Menu Modal */
135+
.navbar-mobile-menu-modal {
136+
position: fixed;
137+
top: 0;
138+
left: 0;
139+
right: 0;
140+
bottom: 0;
141+
display: flex;
142+
flex-direction: column;
143+
align-items: center;
144+
outline: none;
145+
}
146+
147+
.navbar-mobile-menu-modal [role="dialog"] {
148+
outline: none;
149+
}
150+
151+
/* Dropdown Overlay - Mobile menu content */
152+
.navbar-dropdown-overlay {
153+
padding-top: calc(20vh + 5vw);
154+
display: flex;
155+
flex-direction: column;
156+
align-items: center;
157+
overflow: visible;
158+
}
159+
160+
.navbar-dropdown-overlay > div {
161+
width: min-content;
162+
overflow: visible;
163+
}
164+
165+
/* Overlay Logo */
166+
.navbar-overlay-logo {
167+
width: auto;
168+
height: var(--navbar-logo-height-mobile, 2.8rem);
169+
position: absolute;
170+
left: 1.6rem;
171+
top: var(--navbar-overlay-logo-top, 1.2rem); /* (navMobileHeight - headerImageMobileHeight) / 2 = (5.2 - 2.8) / 2 = 1.2rem */
172+
}
173+
174+
/* Overlay Heading */
175+
.navbar-overlay-heading {
176+
font-size: 1.8rem;
177+
font-weight: bold;
178+
letter-spacing: -0.072rem;
179+
line-height: 3rem;
180+
color: var(--nav-text-color, #5f6163);
181+
padding-bottom: 0;
182+
margin: 0;
183+
}
184+
185+
/* Dropdown List - Menu items */
186+
.navbar-dropdown-list {
187+
margin: 0;
188+
padding: 0.6rem 0;
189+
background: none;
190+
}
191+
192+
.navbar-dropdown-list > li {
193+
overflow: visible;
194+
display: block;
195+
}
196+
197+
.navbar-dropdown-list > li a {
198+
overflow: visible;
199+
white-space: nowrap;
200+
display: block;
201+
padding: 0 1rem;
202+
font-size: 1.4rem;
203+
font-weight: normal;
204+
letter-spacing: -0.01rem;
205+
line-height: 2.5rem;
206+
color: var(--nav-text-color, #5f6163);
207+
cursor: pointer;
208+
text-decoration: none;
209+
}
210+
211+
.navbar-dropdown-list > li a:hover {
212+
color: var(--link-hover, #0064a0);
213+
}
214+
215+
.navbar-dropdown-list > li a:focus-visible {
216+
outline: 0.2rem solid var(--focus-outline-color, #007297);
217+
outline-offset: 0.2rem;
218+
}
219+
220+
/* TimesIcon - Close button for mobile menu */
221+
.navbar-times-icon {
222+
cursor: pointer;
223+
border: none;
224+
padding: 0;
225+
background: none;
226+
position: absolute;
227+
height: var(--navbar-height-mobile, 5.2rem);
228+
width: var(--navbar-height-mobile, 5.2rem);
229+
top: 0;
230+
right: 0;
231+
color: var(--nav-text-color, #5f6163);
232+
}

0 commit comments

Comments
 (0)