Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit 77342ea

Browse files
author
manajdov
committed
-fixed border corner clipped by adding custom styles for the first child menu items and the last child menu items in vertical menu
1 parent c590f3e commit 77342ea

File tree

1 file changed

+31
-8
lines changed

1 file changed

+31
-8
lines changed

src/themes/teams/components/Menu/menuItemStyles.ts

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,6 @@ const itemSeparator: ComponentSlotStyleFunction<MenuItemPropsAndState, MenuVaria
8383
...(vertical ? { width: '100%', height: '1px' } : { width: '1px', height: '100%' }),
8484
...(primary ? { background: v.primaryBorderColor } : { background: v.borderColor }),
8585
},
86-
87-
...(vertical && {
88-
':first-child': {
89-
'::before': {
90-
display: 'none',
91-
},
92-
},
93-
}),
9486
}
9587
)
9688
}
@@ -224,6 +216,37 @@ const menuItemStyles: ComponentSlotStylesInput<MenuItemPropsAndState, MenuVariab
224216

225217
// hover styles
226218
':hover': getFocusedStyles({ props, variables: v, color: v.activeColor }),
219+
220+
':first-child': {
221+
...(!pills &&
222+
!iconOnly &&
223+
!(pointing && vertical) &&
224+
!underlined && {
225+
...(vertical && {
226+
borderTopRightRadius: pxToRem(3),
227+
borderTopLeftRadius: pxToRem(3),
228+
'::before': {
229+
display: 'none',
230+
},
231+
}),
232+
...(!vertical && {
233+
borderBottomLeftRadius: pxToRem(3),
234+
borderTopLeftRadius: pxToRem(3),
235+
}),
236+
}),
237+
},
238+
239+
':last-child': {
240+
...(!pills &&
241+
!iconOnly &&
242+
!(pointing && vertical) &&
243+
!underlined && {
244+
...(vertical && {
245+
borderBottomRightRadius: pxToRem(3),
246+
borderBottomLeftRadius: pxToRem(3),
247+
}),
248+
}),
249+
},
227250
}
228251
},
229252

0 commit comments

Comments
 (0)