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

Prevent subcomponent type styles from overriding the primary component #3253

Merged
merged 4 commits into from Dec 11, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
57 changes: 43 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/stylesheets/components/_banner.scss
Expand Up @@ -7,6 +7,10 @@
font-size: font-size($theme-banner-font-family, "3xs");
padding-bottom: units(0);
}

.usa-accordion {
@include typeset($theme-banner-font-family);
Copy link
Contributor

Choose a reason for hiding this comment

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

@thisisdano, this is under the assumption that usa-accordion font could be overridden right?

Copy link
Member Author

Choose a reason for hiding this comment

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

yup — this can be set with the $theme-accordion-font-family theme variable — but in this instance we don't want that value to render, instead we want to render the value of $theme-banner-font-family

because those values happened to be the same in earlier testing, we didn't catch this

}
}

.usa-banner__content {
Expand Down
9 changes: 6 additions & 3 deletions src/stylesheets/components/_footer.scss
Expand Up @@ -151,9 +151,8 @@
}

.usa-footer__logo-heading {
@include h3;
@include typeset($theme-footer-font-family, $theme-h3-font-size, 1);
@include u-margin-y(1);
line-height: line-height("heading", 1);
}

.usa-footer__contact-links {
Expand All @@ -166,7 +165,11 @@
}

.usa-footer__contact-heading {
@include h3;
@include typeset(
$theme-footer-font-family,
$theme-h3-font-size,
$theme-heading-line-height
);
margin-top: 0;

@include at-media("mobile-lg") {
Expand Down
4 changes: 4 additions & 0 deletions src/stylesheets/components/_navigation.scss
Expand Up @@ -55,6 +55,10 @@ $nav-link-arrow-icon-size: 1;
margin-left: units(2);
}
}

.usa-accordion {
@include typeset($theme-navigation-font-family, null, 1);
}
}

// Primary navigation
Expand Down