Skip to content
Merged
Changes from 1 commit
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
Next Next commit
Only output utility font family rules when font is set to output
  • Loading branch information
thisisdano committed Apr 14, 2022
commit b6f29cbdaa2dfb18872ebfd3bee929fdf7a8b7a7
13 changes: 8 additions & 5 deletions packages/uswds-utilities/src/styles/utility-fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ utilities to reference.
----------------------------------------
*/

@use "sass:map";
@use "uswds-core" as *;

$if-important: "";
Expand All @@ -13,10 +14,12 @@ $if-important: "";
$if-important: " !important";
}

@each $face, $stack in $project-font-stacks {
@if $stack {
[class*="#{ns('utility')}font-#{$face}-"] {
font-family: #{$stack}#{$if-important};
@if (map-get($font-settings, "output") == true) or $output-all-utilities {
@each $face, $stack in $project-font-stacks {
@if $stack {
[class*="#{ns('utility')}font-#{$face}-"] {
font-family: #{$stack}#{$if-important};
}
}
}
}
}