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 mobile primary navigation styles #225

Merged
merged 1 commit into from
Jun 17, 2021
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
4 changes: 1 addition & 3 deletions src/img/close-primary.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/img/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 13 additions & 7 deletions src/scss/components/_navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ $header-height: 10;
color: color('ink');
}
}

.usa-nav__primary-item {
> a,
> .usa-nav__link {
@include u-padding-y(2);
}
}
}

@include at-media($theme-header-min-width) {
Expand All @@ -120,10 +127,6 @@ $header-height: 10;
.usa-current {
@include add-bar(0.5, 'secondary', 'bottom', 0, 1.5, 0);
font-weight: font-weight('bold');

&:hover {
color: color('primary-dark');
}
Comment on lines -124 to -126
Copy link
Member Author

@aduth aduth Jun 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
}

Expand Down Expand Up @@ -281,13 +284,16 @@ $header-height: 10;
}
}

// Navigation menu
// Navigation close button
// ---------------------------------

.usa-menu__btn {
height: units($header-height);
.usa-nav__close img {
width: units(1.5);
}

// Navigation menu
// ---------------------------------

.usa-logo__img {
@include at-media-max($theme-header-min-width) {
height: units(2);
Expand Down
2 changes: 0 additions & 2 deletions src/scss/components/_sidenav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

.usa-sidenav__sublist a:not(.usa-button) {
padding-left: units(4);
padding-top: units(1.5);
padding-bottom: units(1.5);
Comment on lines -30 to -31
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again not relevant for primary navigation, but in trying to find a canonical reference for the menu, I noticed a small difference in our sublist styling from the Figma reference. Previously, sublist items had smaller padding, but in the Figma design they're identical padding.

BeforeAfter
beforeafter

}

.usa-sidenav__sublist .usa-current {
Expand Down