Skip to content

Commit d7d692b

Browse files
committed
fix: Fixed-layout navigation aligns with the width of the main content.
1 parent d5c07f1 commit d7d692b

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

ui/src/components/Header/index.scss

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
max-height: 2rem;
3131
}
3232

33+
.fixed-width {
34+
padding-left: 28px;
35+
padding-right: 36px;
36+
}
37+
3338
.create-icon {
3439
color: var(--bs-nav-link-color);
3540
}
@@ -120,6 +125,9 @@
120125

121126
@media (max-width: 1199.9px) {
122127
#header {
128+
.fixed-width {
129+
padding-right: 48px;
130+
}
123131
.nav-grow {
124132
flex-grow: 1 !important;
125133
}
@@ -134,8 +142,21 @@
134142
}
135143
}
136144

145+
@media screen and (max-width: 991px) {
146+
#header {
147+
.fixed-width {
148+
padding-left: 40px;
149+
padding-right: 48px;
150+
}
151+
}
152+
}
153+
137154
@media screen and (max-width: 767px) {
138155
#header {
156+
.fixed-width {
157+
padding-left: 1.5rem;
158+
padding-right: 1.5rem;
159+
}
139160
.nav-text {
140161
flex: 1;
141162
white-space: nowrap;

ui/src/components/Header/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ const Header: FC = () => {
115115
id="header">
116116
<div
117117
className={classnames(
118-
'w-100 d-flex align-items-center px-3',
119-
layout === 'Fixed-width' ? 'container-xxl' : '',
118+
'w-100 d-flex align-items-center',
119+
layout === 'Fixed-width' ? 'container-xxl fixed-width' : 'px-3',
120120
)}>
121121
<Navbar.Toggle
122122
className="answer-navBar me-2"

0 commit comments

Comments
 (0)