-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: theme fontawesome icon size wrapped in spectrum icons (#1658)
Spectrum icons are 18px. However, our icons look best at 16px as they were designed on a 16px grid. This overrides the default spectrum icon size when wrapping a font-awesome icon inside a spectrum icon wrapper. Made overrides not a module, so it doesn't add hashes to the classes in overrides, as I have a feeling this file will be used to target specific classes and that wouldn't be desirable. Note: please suggest somewhere for that variable I added to live if you think that location sucks
- Loading branch information
Showing
10 changed files
with
109 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
packages/components/src/theme/theme-spectrum/theme-spectrum-overrides.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[class^='spectrum'] { | ||
/* --font-family-sans-serif is defined in Bootstrap's _root.scss. We want | ||
Spectrum to use the same default font-family */ | ||
font-family: var(--font-family-sans-serif) !important; | ||
} | ||
|
||
.svg-inline--fa[class*='spectrum-Icon--sizeS'] { | ||
/* | ||
Resize fontawesome icons used inside a spectrum icon wrapper to match | ||
our icon size. Spectrum icons are 18px by default, but our icons are built on a 16px grid. | ||
*/ | ||
--spectrum-alias-workflow-icon-size: var(--dh-svg-inline-icon-size); | ||
} |
5 changes: 0 additions & 5 deletions
5
packages/components/src/theme/theme-spectrum/theme-spectrum-overrides.module.css
This file was deleted.
Oops, something went wrong.
Binary file modified
BIN
+1.89 KB
(100%)
tests/styleguide.spec.ts-snapshots/spectrum-buttons-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3.07 KB
(110%)
tests/styleguide.spec.ts-snapshots/spectrum-buttons-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.85 KB
(100%)
tests/styleguide.spec.ts-snapshots/spectrum-buttons-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.