Skip to content

Commit 8b2d9c2

Browse files
authored
[Tabs][Uplift]: Match hover and active colour (#9619)
## 📣 ❤️ Hey hey reviewers! 🥳 Would you mind looking at the `Questions` portion below? 🙏🏽 THANK YOU IN ADVANCE. ### WHY are these changes introduced? Following the **[Uplift Figma Link for `Tabs`](https://www.figma.com/file/jLLkmo9r28hiqPvf4s90E4/Polaris-Uplift-Components-%5Bgen3%E2%80%93alpha%5D?node-id=84001%3A38964&mode=dev)** 🖌️ , the background colour on `hover` and `active` should be ```CSS background: var(--background-bg-secondary, #F3F3F3); ``` Related #9543 Discovered through Shopify/web#96536 ### WHAT is this pull request doing? (with uplift) | Before | After | |--------|--------| | <img width="566" alt="Screenshot 2023-07-05 at 1 31 29 PM" src="https://github.com/Shopify/polaris/assets/43223543/41da1a18-6f19-4ece-af4d-bba8d5434316"> | <img width="566" alt="Screenshot 2023-07-05 at 1 32 34 PM" src="https://github.com/Shopify/polaris/assets/43223543/96c1239c-d63a-4cb1-a43e-6ddb2ae9cc9d"> | ### ❓ Questions 🙏🏽 1. I'm noticing that the `More views` font is slightly more bolded - is this what we want? I can't find any thing in the Figma 😄 <img width="250" alt="Screenshot 2023-07-05 at 1 59 53 PM" src="https://github.com/Shopify/polaris/assets/43223543/084499b4-aeff-4280-982b-e3d4780c234d"> 2. At a certain breakpoint, `More views` disappears, the tabs get slightly larger, and then a scroll appears. Is this the desired behaviour? I find it a little jarring. Here's a video: https://github.com/Shopify/polaris/assets/43223543/392582e0-6f59-4449-89b3-cde4a9a42429 ### How to 🎩 🎩 🌀 [SPIN on web with these changes 😄 - takes you to Orders ❤️ ](https://admin.web.more-views.gina-bak.us.spin.dev/store/shop1/orders?inContextTimeframe=none) 🌀 Ensure that you have a smaller window frame to ensure that the `More views` is triggered 😄 🖥 [Local development instructions](https://github.com/Shopify/polaris/blob/main/README.md#local-development) 🗒 [General tophatting guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md) 📄 [Changelog guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog) ### 🎩 checklist - [ ] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) - [x] Tested on [multiple browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers) - [x] Tested for [accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md) - [ ] Updated the component's `README.md` with documentation changes - [x] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide
1 parent ba0e897 commit 8b2d9c2

File tree

1 file changed

+8
-27
lines changed

1 file changed

+8
-27
lines changed

polaris-react/src/components/Tabs/Tabs.scss

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,8 @@
133133
}
134134

135135
&:not([aria-disabled='true']):hover {
136-
background-color: var(--p-color-bg-subdued);
136+
background-color: var(--p-color-bg-secondary-experimental);
137137
color: var(--p-color-text-primary);
138-
139-
#{$se23} & {
140-
background-color: var(--p-color-bg-secondary-experimental);
141-
}
142138
}
143139

144140
&:not([aria-disabled='true']):focus-visible {
@@ -149,13 +145,9 @@
149145
}
150146

151147
&:not([aria-disabled='true']):active {
152-
background-color: var(--p-color-bg-subdued);
148+
background-color: var(--p-color-bg-secondary-experimental);
153149
color: var(--p-color-text-primary);
154150
z-index: var(--p-z-index-1);
155-
156-
#{$se23} & {
157-
background-color: var(--p-color-bg-secondary-experimental);
158-
}
159151
}
160152

161153
@media #{$p-breakpoints-md-up} {
@@ -187,12 +179,9 @@
187179
}
188180

189181
#{$se23} & {
190-
background: var(--p-color-bg-subdued);
182+
background: var(--p-color-bg-secondary-experimental);
191183
color: var(--p-color-text);
192-
193-
#{$se23} & {
194-
background: var(--p-color-bg-secondary-experimental);
195-
}
184+
border-radius: var(--p-border-radius-2);
196185

197186
&[aria-disabled='true'] {
198187
background: var(--p-color-bg-disabled);
@@ -201,20 +190,12 @@
201190

202191
&:not([aria-disabled='true']):hover,
203192
&:not([aria-disabled='true']):focus {
204-
background-color: var(--p-color-bg-subdued);
193+
background-color: var(--p-color-bg-secondary-experimental);
205194
color: var(--p-color-text-primary);
206-
207-
#{$se23} & {
208-
background-color: var(--p-color-bg-secondary-experimental);
209-
}
210195
}
211196

212197
&:not([aria-disabled='true']):active {
213-
background-color: var(--p-color-bg-subdued);
214-
215-
#{$se23} & {
216-
background-color: var(--p-color-bg-secondary-experimental);
217-
}
198+
background-color: var(--p-color-bg-secondary-experimental);
218199
}
219200
}
220201
}
@@ -374,7 +355,7 @@
374355
}
375356

376357
&:not([aria-disabled='true']):hover {
377-
background-color: var(--p-color-bg-interactive-subdued-active);
358+
background-color: var(--p-color-bg-secondary-experimental);
378359
color: var(--p-color-text-primary);
379360
}
380361

@@ -384,7 +365,7 @@
384365
}
385366

386367
&:not([aria-disabled='true']):active {
387-
background-color: var(--p-color-bg-interactive-subdued-active);
368+
background-color: var(--p-color-bg-secondary-experimental);
388369
}
389370
}
390371
}

0 commit comments

Comments
 (0)