Skip to content

Conversation

@TrevorBurnham
Copy link
Contributor

@TrevorBurnham TrevorBurnham commented Jan 4, 2026

Description

I noticed that some CSS declarations were being repeated in loops. For example, the class for each icon size has the same box-sizing and vertical-align declarations.

This PR moves those declarations to avoid repetition, reducing the amount of generated CSS by ~1.3KB (total) across the icon, spinner, tiles, and button components.

How has this been tested?

Since this is purely a CSS change, the screenshot tests (which I don't have the ability to run) should be definitive.

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Move repeated declarations from size/variant-specific selectors to base
classes, reducing compiled CSS output:

- icon: box-sizing and vertical-align to .icon base class
- spinner: remove redundant box-sizing from size loop (already on .root)
- tiles: remove redundant box-sizing from column loop (already on .tile-container)
- button: hoist text-decoration and position to .button base class

Total savings: ~1.3KB across affected components.
@TrevorBurnham TrevorBurnham requested a review from a team as a code owner January 4, 2026 20:02
@TrevorBurnham TrevorBurnham requested review from YueyingLu and removed request for a team January 4, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant