Skip to content

Commit 7cbbbb1

Browse files
committed
[PR feedback] Fix extra inline strut height on EuiSwitches
1 parent 5abd42a commit 7cbbbb1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

packages/eui/src/components/form/switch/switch.styles.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ export const euiSwitchStyles = (euiThemeContext: UseEuiTheme) => {
8888
position: relative;
8989
display: inline-flex;
9090
align-items: flex-start;
91+
/* Required for inline-flex CSS to not render an extra 2-3px of strut height
92+
* @see https://stackoverflow.com/a/27536461/4294462 */
93+
vertical-align: middle;
9194
`,
9295
// Skip css`` to avoid generating an extra Emotion className
9396
enabled: `

0 commit comments

Comments
 (0)