diff --git a/src/mantine-core/src/Switch/Switch.story.tsx b/src/mantine-core/src/Switch/Switch.story.tsx index 99043288ba7..5f2e539ee3e 100644 --- a/src/mantine-core/src/Switch/Switch.story.tsx +++ b/src/mantine-core/src/Switch/Switch.story.tsx @@ -104,3 +104,7 @@ export function WithError() { ); } + +export function Alignment() { + return ; +} diff --git a/src/mantine-core/src/Switch/Switch.styles.ts b/src/mantine-core/src/Switch/Switch.styles.ts index 152568d1fc6..51936d324dd 100644 --- a/src/mantine-core/src/Switch/Switch.styles.ts +++ b/src/mantine-core/src/Switch/Switch.styles.ts @@ -60,13 +60,14 @@ export default createStyles( return { input: { clip: 'rect(1px, 1px, 1px, 1px)', - height: '1px', + height: 0, + width: 0, overflow: 'hidden', - width: '1px', whiteSpace: 'nowrap', - padding: '0', + padding: 0, WebkitClipPath: 'inset(50%)', clipPath: 'inset(50%)', + position: 'absolute', }, track: {