Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update padding for mobile #1027

Merged
merged 2 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions packages/gatsby-theme-newrelic/src/components/GlobalHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,23 +150,17 @@ const GlobalHeader = ({ className, activeSite, hideSearch = false }) => {
z-index: 80;
height: var(--global-header-height);
@media screen and (max-width: ${LAYOUT_BREAKPOINT}) and (min-width: ${NAV_BREAKPOINT}) {
grid-template-columns: calc(150px + var(--site-content-padding)) minmax(
0,
1fr
);
grid-template-columns: calc(150px + 1.5rem) minmax(0, 1fr);
}
@media screen and (max-width: ${mobileBreakpoint}) {
grid-template-columns: calc(150px + var(--site-content-padding)) minmax(
0,
1fr
);
grid-template-columns: calc(150px + 1.5rem) minmax(0, 1fr);
}
`}
>
<nav
css={css`
grid-area: logo;
padding: 0 var(--site-content-padding);
padding: 0 1.5rem;
display: flex;
align-items: center;
height: 100%;
Expand Down Expand Up @@ -235,7 +229,7 @@ const GlobalHeader = ({ className, activeSite, hideSearch = false }) => {
grid-area: nav;
display: flex;
justify-content: space-between;
padding: 0 var(--site-content-padding);
padding: 0 1.5rem;
width: 100%;
max-width: var(--site-max-width);
margin: auto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const GlobalStyles = ({ layout }) => (
}

h1 {
line-height: 1.5rem;
line-height: 1.15;
font-weight: bold;
margin-bottom: 1rem;
}
Expand Down
4 changes: 4 additions & 0 deletions packages/gatsby-theme-newrelic/src/components/Layout/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ const Main = ({ className, children }) => {
max-width: var(--site-max-width);
margin: 0 auto;
width: 100%;

@media screen and (max-width: 1000px) {
padding: 1.5rem;
}
`}
>
{children}
Expand Down
Loading