Visitar URL original
USWDS - Core: Deprecate font-smoothing mixins by mejiaj · Pull Request #5250 · uswds/uswds · GitHub
Skip to content
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@use "uswds-core" as *;

.usa-dark-background {
@include add-knockout-font-smoothing;
background-color: color("base-darker");

p,
Expand Down
11 changes: 11 additions & 0 deletions packages/uswds-core/src/styles/_deprecated.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,14 @@ $output-all-utilities: true !default;
@mixin embed-container($height, $width) {
padding-bottom: math.percentage(math.div($height, $width));
}

$font-smoothing-warning: "Font smoothing was deprecated in USWDS 3.5.0. Please remove any references to it.";

// Deprecated in 3.5.0
@mixin add-knockout-font-smoothing {
@warn $font-smoothing-warning;
}

@mixin no-knockout-font-smoothing {
@warn $font-smoothing-warning;
}
Comment on lines +30 to +39

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for remembering this

1 change: 0 additions & 1 deletion packages/uswds-core/src/styles/mixins/general/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
@forward "add-bar";
@forward "add-checkbox-placeholder";
@forward "add-kerning";
@forward "add-knockout-font-smoothing";
@forward "add-responsive-site-margins";
@forward "add-success-mark";
@forward "button-disabled";
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
@use "./add-knockout-font-smoothing" as *;
@use "../../functions" as *;

@mixin button-disabled {
@include add-knockout-font-smoothing;
background-color: color("disabled");
color: color("white");
cursor: auto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
@use "../../mixins/utilities" as *;
@use "../typography/usa-prose" as *;
@use "../typography/typeset" as *;
@use "add-knockout-font-smoothing" as *;

@mixin button-unstyled {
@include no-knockout-font-smoothing;
@include typeset-link;
background-color: transparent;
border: 0;
Expand Down Expand Up @@ -42,7 +40,6 @@
&:disabled,
&[aria-disabled="true"],
&.usa-button--disabled {
@include no-knockout-font-smoothing;
background-color: transparent;
box-shadow: none;
text-decoration: underline;
Expand Down