Skip to content

TagGroup: Nest .spectrum-Tag-action class to prioritize over ClearButton css#3353

Merged
LFDanLu merged 2 commits into
mainfrom
taggroup-class-priority
Jul 28, 2022
Merged

TagGroup: Nest .spectrum-Tag-action class to prioritize over ClearButton css#3353
LFDanLu merged 2 commits into
mainfrom
taggroup-class-priority

Conversation

@tiffany-sy-lin
Copy link
Copy Markdown
Collaborator

@tiffany-sy-lin tiffany-sy-lin commented Jul 27, 2022

No ticket. Noticed it while adding TagGroup into Inventory. There's no priority between .spectrum-Tag-action and .button_spectrum-ClearButton so in Inventory, .button_spectrum-ClearButton styles are applied first and as a result end up higher in hierarchy which we do not want.

I moved .spectrum-Tag-action into .spectrum-Tags-item so it has a place within the tag class hierarchy.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

  1. Open any TagGroup story that has isRemovable=true and confirm no visual changes.
  2. Open inspector and inspect the div that has the .button_spectrum-ClearButton class. Note the width and height css props are crossed out (see screenshot for reference)

image

🧢 Your Project:

@quarry/inventory

@tiffany-sy-lin tiffany-sy-lin requested a review from LFDanLu July 27, 2022 23:00
@adobe-bot
Copy link
Copy Markdown

Copy link
Copy Markdown
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

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

👍🏻 thanks for fixing that

Copy link
Copy Markdown
Member

@LFDanLu LFDanLu left a comment

Choose a reason for hiding this comment

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

Specificity strikes again, LGTM

@adobe-bot
Copy link
Copy Markdown

@LFDanLu LFDanLu merged commit 0a0891a into main Jul 28, 2022
@LFDanLu LFDanLu deleted the taggroup-class-priority branch July 28, 2022 16:58
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.

4 participants