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

fix(style-guide): use inherited fontSize for ColorPalette color labels #2135

Merged
merged 1 commit into from Feb 16, 2022
Merged

fix(style-guide): use inherited fontSize for ColorPalette color labels #2135

merged 1 commit into from Feb 16, 2022

Conversation

braaar
Copy link
Contributor

@braaar braaar commented Feb 16, 2022

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

  • feat(examples/next): Add new deps, fully use TSX, rebuild #2068 (@lachlanjc)
  • @theme-ui/tailwind
    • feat(tailwind): Upgrade Tailwind theme conversion for v3.0 #2082 (@lachlanjc)
  • @theme-ui/custom-properties
    • feat(custom-properties): Warn in development on invalid theme keys #2080 (@lachlanjc)
  • @theme-ui/color-modes
    • feat(color-modes): Warn when theme color keys have leading/trailing whitespace #2099 (@lachlanjc)
  • theme-ui

🐛 Bug Fix

👨‍💻 Minor changes

  • Update jsx-pragma.mdx (@hasparus)
  • docs(examples/next): fix case insensitive import (@hasparus)

🏠 Internal

Authors: 8

@vercel
Copy link

vercel bot commented Feb 16, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/systemui/theme-ui/DnRoCS8SKFcd4BzQDyqoJwhuwHNr
✅ Preview: https://theme-ui-git-fork-braaar-fix-color-row-font-size-systemui.vercel.app

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a6b3b12:

Sandbox Source
next-theme-ui-example Configuration
gatsby-plugin-theme-ui-example Configuration

@lachlanjc lachlanjc merged commit b5c04f1 into system-ui:develop Feb 16, 2022
@lachlanjc
Copy link
Member

Thank you for the fix!!

@hasparus
Copy link
Member

🚀 PR was released in v0.14.0 🚀

@hasparus hasparus added released This issue/pull request has been released. and removed prerelease This change is available in a prerelease. labels Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants