fix(style-guide): use inherited fontSize for ColorPalette color labels #2135
+0
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
see #2112
This PR removes the fontSize specification from the ColorRow component, making it so that the color swatch labels are displayed in the inherited fontSize for wherever it is placed in the DOM.
The issue with the current code is that the color swatch labels will usually be displayed with the smallest fontSize in the project since that is the first entry in the array.
As I discuss in #2112, in my case the smallest fontSize was 0, meaning that the labels didn't show up at all. I have seen some other theme pages such as this one from Hack Club where it is clear that color labels appear quite small, which is not pleasing to the eye. It is also not so convenient that the fontSize is hard coded in this way.
Version
Published prerelease version:
v0.14.0-develop.13
Changelog
🎉 This release contains work from new contributors! 🎉
Thanks for all your work!
❤️ Brage (@braaar)
❤️ peterlits zo (@PeterlitsZo)
❤️ Ryan Turner (@rtturner)
❤️ Cannon Lock (@CannonLock)
🚀 Enhancement
@theme-ui/tailwind
@theme-ui/custom-properties
@theme-ui/color-modes
theme-ui
🐛 Bug Fix
@theme-ui/style-guide
@theme-ui/components
@theme-ui/sidenav
👨💻 Minor changes
🏠 Internal
@theme-ui/sidenav
Authors: 8