Skip to content

Commit 9472c8e

Browse files
authored
fix(Toolbar): fix overflow popover margins (#4985)
- Only apply styles to immediate children in overflow popover - Use correct margin for buttons - Replace physical with logical CSS properties
1 parent 31772fd commit 9472c8e

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

packages/main/src/components/Toolbar/Toolbar.jss.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ export const styles = {
1212
display: 'flex',
1313
justifyContent: 'space-between',
1414
alignItems: 'center',
15-
borderBottom: `solid 0.0625rem ${ThemingParameters.sapGroup_TitleBorderColor}`
15+
borderBlockEnd: `solid 0.0625rem ${ThemingParameters.sapGroup_TitleBorderColor}`
1616
},
1717
hasOverflow: {
1818
'& $toolbar': {
1919
maxWidth: 'calc(100% - 44px)'
2020
}
2121
},
2222
clear: {
23-
borderBottom: 'none'
23+
borderBlockEnd: 'none'
2424
},
2525
active: {
2626
cursor: 'pointer',
@@ -85,23 +85,26 @@ export const styles = {
8585
popoverPhone: {
8686
width: 'calc(100% - 10px)',
8787
maxWidth: 'calc(100% - 10px)',
88-
left: '5px !important'
88+
insetInlineStart: '5px !important'
8989
},
9090
popoverContent: {
9191
padding: CssSizeVariables.ui5WcrToolbarPopoverContentPadding,
9292
display: 'flex',
9393
flexDirection: 'column',
94-
'& [ui5-toggle-button], & [ui5-button]': {
95-
marginBottom: '0.25rem'
94+
'& >[ui5-toggle-button], & >[ui5-button]': {
95+
marginBlock: '0.25rem'
9696
},
97-
'& [ui5-button]::part(button) ,& [ui5-toggle-button]::part(button)': {
97+
'& >[ui5-button]::part(button) ,& >[ui5-toggle-button]::part(button)': {
9898
justifyContent: 'start'
9999
},
100-
'& [ui5-button][icon-only]::part(button), & [ui5-toggle-button][icon-only]::part(button)': {
100+
'& >[ui5-button][icon-only]::part(button), & >[ui5-toggle-button][icon-only]::part(button)': {
101101
padding: 'revert'
102102
},
103-
'& :last-child': {
104-
marginBottom: 0
103+
'& >:last-child': {
104+
marginBlockEnd: 0
105+
},
106+
'& >:first-child': {
107+
marginBlockStart: 0
105108
}
106109
},
107110
childContainer: { display: 'flex' }

0 commit comments

Comments
 (0)