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 specificity in the ButtonGroup #2246

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

connor-baer
Copy link
Member

Purpose

TIL that CSS media queries don't increase style specificity 🤯 This means the order of CSS rules matters.

Specifically, the ButtonGroup failed to apply a margin to the secondary button on wide viewports because the Button styles came after the ButtonGroup styles in the generated CSS file, thus overriding it.

Approach and changes

  • Increase the specificity of the ButtonGroup styles

Definition of done

  • Development completed
  • Reviewers assigned
  • Unit and integration tests
  • Meets minimum browser support
  • Meets accessibility requirements

@connor-baer connor-baer added the 🐞 bug Something isn't working as it should label Sep 11, 2023
@connor-baer connor-baer requested a review from a team as a code owner September 11, 2023 19:30
@connor-baer connor-baer requested review from pdrmdrs and removed request for a team September 11, 2023 19:30
@changeset-bot
Copy link

changeset-bot bot commented Sep 11, 2023

🦋 Changeset detected

Latest commit: bf72386

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sumup/circuit-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Sep 11, 2023

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

Name Status Preview Updated (UTC)
oss-circuit-ui ✅ Ready (Inspect) Visit Preview Sep 11, 2023 7:30pm

@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Merging #2246 (bf72386) into main (7a0eeff) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2246   +/-   ##
=======================================
  Coverage   97.01%   97.01%           
=======================================
  Files         251      251           
  Lines       19822    19822           
  Branches     1211     1211           
=======================================
  Hits        19230    19230           
  Misses        572      572           
  Partials       20       20           

@connor-baer connor-baer merged commit 7c53988 into main Sep 11, 2023
10 checks passed
@connor-baer connor-baer deleted the fix/button-group-style-specificity branch September 11, 2023 19:34
@connor-baer connor-baer mentioned this pull request Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working as it should 🗂 circuit-ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant