Skip to content

Commit ff70ab3

Browse files
alex-pagemrcthms
andauthored
Fix border radius nav (#8626)
### WHY are these changes introduced? ![Screenshot 2023-03-10 at 11 04 07 am](https://user-images.githubusercontent.com/19199063/224219789-ef2bca5e-98af-464b-b874-73ec5ea0f256.png) When pressing down on a Navigation Item the border radius is lost and it becomes square ### WHAT is this pull request doing? Moving styles to the element where the background color and radius should belong. --------- Co-authored-by: Marc Thomas <[email protected]>
1 parent 83bde86 commit ff70ab3

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

.changeset/grumpy-donuts-vanish.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/polaris': patch
3+
---
4+
5+
Fix border radius on active/pressed navigation items

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,14 @@ $disabled-fade: 0.6;
113113
@include nav-item-attributes;
114114
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
115115
position: relative;
116+
117+
border-radius: var(--p-border-radius-1);
118+
119+
&:is(:hover, :focus-visible) {
120+
background: var(--p-background-hovered);
121+
color: var(--p-text);
122+
text-decoration: none;
123+
}
116124
}
117125

118126
.Item-selected {
@@ -236,13 +244,6 @@ $disabled-fade: 0.6;
236244
flex-wrap: nowrap;
237245
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
238246
width: 100%;
239-
border-radius: var(--p-border-radius-1);
240-
241-
&:hover {
242-
background: var(--p-background-hovered);
243-
color: var(--p-text);
244-
text-decoration: none;
245-
}
246247

247248
&.ItemInnerDisabled {
248249
pointer-events: none;

0 commit comments

Comments
 (0)