Skip to content

Refactor form control sizing #1005

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

Merged
merged 33 commits into from
Jun 3, 2025
Merged

Refactor form control sizing #1005

merged 33 commits into from
Jun 3, 2025

Conversation

lindsaym-fa
Copy link
Contributor

@lindsaym-fa lindsaym-fa commented May 30, 2025

This work removes a ton of obscure logic from our size.css utility and instead relies on relative sizing for our components. To do so, this PR —

  • Removes all custom properties from size.css, including --wa-size, --wa-size-smaller, --wa-size-larger, --wa-space, --wa-space-smaller, --wa-space-larger, --size-*, --space-*, etc.
  • Updated component font sizes so that size="" need only set font-size to take effect
  • Adds the following tokens for form control sizing:
    • --wa-form-control-padding-inline (default 1em)
    • --wa-form-control-padding-block (default 0.75em)
    • --wa-form-control-toggle-size (default 1lh)
  • Moves --wa-form-control-height from styles/utilities/size.css > styles/themes/groups.css
  • Refactors --wa-font-size-* tokens to use accurate typescale calculations to better support new properties for --wa-font-size-smaller and --wa-font-size-larger

Additionally, I snuck the following changes in (easily reverted if we're at all concerned) —


Related bugs —

@lindsaym-fa lindsaym-fa linked an issue May 30, 2025 that may be closed by this pull request
Copy link

vercel bot commented May 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
webawesome ✅ Ready (Inspect) Visit Preview Jun 3, 2025 8:21pm

@lindsaym-fa lindsaym-fa marked this pull request as ready for review June 3, 2025 16:16
claviska
claviska previously approved these changes Jun 3, 2025
Copy link
Member

@claviska claviska left a comment

Choose a reason for hiding this comment

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

Wow, great work! I left a non-blocking comment, but otherwise no concerns.

claviska
claviska previously approved these changes Jun 3, 2025
claviska
claviska previously approved these changes Jun 3, 2025
* try a second updateComplete??

* try a second updateComplete??

* more timeouts?

* try logging

* more logging
gp

* maybe now

* radio group test

* add todo note'
@lindsaym-fa lindsaym-fa merged commit 5980b5f into next Jun 3, 2025
2 checks passed
@claviska claviska deleted the lm/form-control-sizing branch June 3, 2025 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment