Skip to content

Commit bc30e1c

Browse files
authored
fix(checkbox): fixed the checkbox component bidi layout issue. (#7524) (#7564)
Fixed the tick orientation for checkbox component in bidi(RTL) layout by adding the RTLCSS value directives. (#7524)
1 parent cc1932a commit bc30e1c

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,15 @@
637637
"contributions": [
638638
"code"
639639
]
640+
},
641+
{
642+
"login": "DavidSCChen",
643+
"name": "DavidSCChen",
644+
"avatar_url": "https://avatars1.githubusercontent.com/u/54974983?v=4",
645+
"profile": "https://github.com/DavidSCChen",
646+
"contributions": [
647+
"code"
648+
]
640649
}
641650
],
642651
"commitConvention": "none"

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ check out our [Contributing Guide](/.github/CONTRIBUTING.md) and our
164164
<td align="center"><a href="https://github.com/asfordmatt"><img src="https://avatars2.githubusercontent.com/u/14233261?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Matt Chapman</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=asfordmatt" title="Code">💻</a></td>
165165
<td align="center"><a href="https://github.com/munkurious"><img src="https://avatars0.githubusercontent.com/u/2187109?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Boston Cartwright</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=munkurious" title="Code">💻</a></td>
166166
</tr>
167+
<tr>
168+
<td align="center"><a href="https://github.com/DavidSCChen"><img src="https://avatars1.githubusercontent.com/u/54974983?v=4?s=100" width="100px;" alt=""/><br /><sub><b>DavidSCChen</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=DavidSCChen" title="Code">💻</a></td>
169+
</tr>
167170
</table>
168171

169172
<!-- markdownlint-restore -->

packages/components/docs/sass.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17031,12 +17031,12 @@ Checkbox styles
1703117031
left: rem(6px);
1703217032
width: rem(9px);
1703317033
height: rem(5px);
17034-
margin-top: rem(-3px);
17034+
margin-top: rem(-3px) /* rtl: 0rem */;
1703517035
background: none;
1703617036
border-bottom: 2px solid $inverse-01;
1703717037
border-left: 2px solid $inverse-01;
17038-
transform: scale(0) rotate(-45deg);
17039-
transform-origin: bottom right;
17038+
transform: scale(0) rotate(-45deg) /* rtl: scale(0) rotate(45deg) */;
17039+
transform-origin: bottom right /* rtl: center */;
1704017040
content: '';
1704117041
}
1704217042

@@ -17057,7 +17057,7 @@ Checkbox styles
1705717057
// Display the check
1705817058
.#{$prefix}--checkbox:checked + .#{$prefix}--checkbox-label::after,
1705917059
.#{$prefix}--checkbox-label[data-contained-checkbox-state='true']::after {
17060-
transform: scale(1) rotate(-45deg);
17060+
transform: scale(1) rotate(-45deg) /* rtl: scale(-1,1) rotate(45deg) */;
1706117061
}
1706217062

1706317063
// Indeterminate symbol

packages/components/src/components/checkbox/_checkbox.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@
101101
left: rem(6px);
102102
width: rem(9px);
103103
height: rem(5px);
104-
margin-top: rem(-3px);
104+
margin-top: rem(-3px) /* rtl: 0rem */;
105105
background: none;
106106
border-bottom: 2px solid $inverse-01;
107107
border-left: 2px solid $inverse-01;
108-
transform: scale(0) rotate(-45deg);
109-
transform-origin: bottom right;
108+
transform: scale(0) rotate(-45deg) /* rtl: scale(0) rotate(45deg) */;
109+
transform-origin: bottom right /* rtl: center */;
110110
content: '';
111111
}
112112

@@ -127,7 +127,7 @@
127127
// Display the check
128128
.#{$prefix}--checkbox:checked + .#{$prefix}--checkbox-label::after,
129129
.#{$prefix}--checkbox-label[data-contained-checkbox-state='true']::after {
130-
transform: scale(1) rotate(-45deg);
130+
transform: scale(1) rotate(-45deg) /* rtl: scale(-1,1) rotate(45deg) */;
131131
}
132132

133133
// Indeterminate symbol

0 commit comments

Comments
 (0)