diff --git a/CHANGELOG.md b/CHANGELOG.md
index 11b14a53f6..b15dc21391 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -37,6 +37,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
### Fixes
- Fix `ChatMessage`'s focus border overlays `actionMenu` in Teams theme @mnajdova ([#1637](https://github.com/stardust-ui/react/pull/1637))
+- Fix a gap in `Checkbox` in RTL mode @layershifter ([#1683](https://github.com/stardust-ui/react/pull/1683))
### Documentation
- Make sidebar categories collapsible @lucivpav ([#1611](https://github.com/stardust-ui/react/pull/1611))
diff --git a/docs/src/examples/components/Checkbox/Rtl/CheckboxExample.rtl.tsx b/docs/src/examples/components/Checkbox/Rtl/CheckboxExample.rtl.tsx
new file mode 100644
index 0000000000..9bf89339c8
--- /dev/null
+++ b/docs/src/examples/components/Checkbox/Rtl/CheckboxExample.rtl.tsx
@@ -0,0 +1,14 @@
+import * as React from 'react'
+import { Checkbox, Divider, Flex } from '@stardust-ui/react'
+
+const CheckboxExampleRtl = () => (
+
+
+
+
+
+
+
+)
+
+export default CheckboxExampleRtl
diff --git a/docs/src/examples/components/Checkbox/Rtl/index.tsx b/docs/src/examples/components/Checkbox/Rtl/index.tsx
new file mode 100644
index 0000000000..577083f1e4
--- /dev/null
+++ b/docs/src/examples/components/Checkbox/Rtl/index.tsx
@@ -0,0 +1,12 @@
+import * as React from 'react'
+
+import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample'
+import NonPublicSection from 'docs/src/components/ComponentDoc/NonPublicSection'
+
+const Rtl = () => (
+
+
+
+)
+
+export default Rtl
diff --git a/docs/src/examples/components/Checkbox/index.tsx b/docs/src/examples/components/Checkbox/index.tsx
index db748fb7c2..cb1902c87a 100644
--- a/docs/src/examples/components/Checkbox/index.tsx
+++ b/docs/src/examples/components/Checkbox/index.tsx
@@ -1,5 +1,6 @@
import * as React from 'react'
+import Rtl from './Rtl'
import Slots from './Slots'
import States from './States'
import Types from './Types'
@@ -9,6 +10,7 @@ const CheckboxExamples = () => (
+
>
)
diff --git a/packages/react/src/themes/base/components/Checkbox/checkboxStyles.ts b/packages/react/src/themes/base/components/Checkbox/checkboxStyles.ts
index dc975712fe..928709d56d 100644
--- a/packages/react/src/themes/base/components/Checkbox/checkboxStyles.ts
+++ b/packages/react/src/themes/base/components/Checkbox/checkboxStyles.ts
@@ -7,7 +7,14 @@ const checkboxStyles: ComponentSlotStylesInput ({
+ '-ms-grid-column': p.labelPosition === 'start' ? 3 : 1,
+ '-ms-grid-row-align': 'center',
+
borderColor: v.checkboxBorderColor,
borderStyle: v.checkboxBorderStyle,
borderRadius: v.checkboxBorderRadius,
@@ -45,15 +55,15 @@ const checkboxStyles: ComponentSlotStylesInput ({
- [p.labelPosition === 'start' ? ':after' : ':before']: {
- content: '" "',
- display: 'inline-block',
- width: v.checkboxGap,
- },
+ label: ({ props: p }): ICSSInJSStyle => ({
+ '-ms-grid-column': p.labelPosition === 'start' ? 1 : 3,
+ display: 'block', // IE11: should be forced to be block, as inline-block is not supported
}),
toggle: ({ props: p, variables: v }): ICSSInJSStyle => ({
+ '-ms-grid-column': p.labelPosition === 'start' ? 3 : 1,
+ '-ms-grid-row-align': 'center',
+
background: v.toggleBackground,
borderColor: v.toggleBorderColor,
borderStyle: v.toggleBorderStyle,