Skip to content

Commit 7fb1bc9

Browse files
committed
Fix jump in right hand nav menu compared to parent site
1 parent 5b772e0 commit 7fb1bc9

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

src/components/headers/dark-mode-toggle.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ const ModeIcon = styled(({ ...props }) => <FontAwesomeIcon {...props} />)`
88
padding-left: 0;
99
display: inline-block;
1010
width: 1em;
11+
transform: translateX(0.5px); // To ensure alignment with parent site
1112
`
1213

1314
const Toggle = styled.li`
1415
display: block;
15-
padding: 16px 15px;
16-
padding-left: 10px; /* hacky override to match spacing (more or less) to parent site */
16+
padding: 0 0;
17+
padding-left: 4px; /* hacky override to match spacing (more or less) to parent site */
1718
`
1819

1920
const modes = [{

src/components/headers/navigation.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ const Logo = styled.a`
9696
// The main site sets a height, but that inflates and crops the image, so we need to do it in a wrapper div
9797
`
9898

99-
const LangIcon = styled(({ ...props }) => <FontAwesomeIcon {...props} />)``
99+
const LangIcon = styled(({ ...props }) => <FontAwesomeIcon {...props} />)`
100+
transform: translateX(1px); // To ensure alignment with parent site
101+
padding-right: 1px;
102+
`
100103

101104
// This isn't needed on the main site, but we seem to need it here to properly pad the cta in the mobile menu, and also to get it to take the full width
102105
// noinspection CssUnknownProperty

src/components/headers/submenu.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ const MobileSubmenu = styled.ul`
5353
const FlippyIcon = styled(({ isOpen, ...props }) => (
5454
<FontAwesomeIcon {...props} />
5555
))`
56+
transform: translateX(-1px); // To ensure alignment with parent site
57+
5658
${({ isOpen }) =>
5759
isOpen &&
5860
`
@@ -64,7 +66,7 @@ const FlippyIcon = styled(({ isOpen, ...props }) => (
6466
const MenuTitle = styled.div`
6567
display: flex;
6668
flex-direction: row;
67-
gap: 3.8px;
69+
gap: 6px;
6870
justify-content: flex-end;
6971
align-items: center;
7072
padding: 0 14.4px; // Occult values to match the main site

src/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ html {
169169
}
170170

171171
/** Adjustments for small screens */
172-
@media screen and (max-width: 1366px) {
172+
@media screen and (max-width: 1024px) {
173173
html {
174174
--site-margins: 4rem;
175175
--navbar-padding: 1.5rem;

0 commit comments

Comments
 (0)