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

Consistent box sizing border box #2115

Merged
merged 19 commits into from
Jun 10, 2024

Conversation

rajsite
Copy link
Member

@rajsite rajsite commented May 16, 2024

Pull Request

🀨 Rationale

Switch to using box-sizing: border-box; consistently in all our components.

πŸ‘©β€πŸ’» Implementation

  • Each component should use the display helper when defined which was made consistent in Use display helper consistently for all componentsΒ #2114. This PR leverages that helper to make sure each component sets the elements in the shadow root to use box-sizing: border-box; consistently
  • Created separate selectors for targeting all children, i.e. * {}, the host itself, i.e. :host {}, and all before and after pseduo-elements so devtools stays clearer, specifically the selector for :host and the selector for * are clear in dev tools without the noise of the ::before and ::after selectors
  • Cleared the manual configuration for box-sizing
  • Cleaned up some padding configurations (now consistently included in the size inside the border) to be margin configurations (which are outside the border and not part of the size).

πŸ§ͺ Testing

Rely on chromatic, explanation of some of the changes:

  • Menu changes look correct, the minimum size now includes the border instead of the border going outside the configured size
  • Select filter box changes look improved. The sizing of the filter box and the no options box now fit the control height instead of being larger than the control height
  • Rich text changes look innocuous. Added the interaction design figma we have but don't think there are strict visual design docs to reference.

βœ… Checklist

  • I have updated the project documentation to reflect my changes or determined no changes are needed.

@rajsite rajsite changed the base branch from consistent-display-helper to main May 16, 2024 00:22
@rajsite rajsite changed the base branch from main to box-sizing-squashed June 10, 2024 21:46
@rajsite rajsite marked this pull request as ready for review June 10, 2024 21:47
@rajsite rajsite merged commit db8b50e into box-sizing-squashed Jun 10, 2024
13 checks passed
@rajsite rajsite deleted the consistent-box-sizing-border-box branch June 10, 2024 21:47
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