Skip to content

Commit

Permalink
Fixed Arabic Right Direction Issue (#12033)
Browse files Browse the repository at this point in the history
### Related Ticket(s)

[Noitce & Choice w3 Publisher](https://w3.ibm.com/w3publisher/urx/notice-and-choice-v23)

### Description

Notice & Choice is a legally required component to create a form where IBM collects its customer information.
This section shows the specific product's legal links, terms, and conditions. Along with this, it collects users' consent regarding communication preferences.

### Changelog

**New**

**Changed**

- The problem with the Arabic checkbox displaying the tick mark in CSS has been resolved.

**Removed**

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "test: e2e": Codesandbox examples and e2e integration tests -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
  • Loading branch information
deathcave authored Sep 18, 2024
1 parent 2b40e0f commit c23fad6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/styles/scss/components/notice-choice/_notice-choice.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
@use '@carbon/styles/scss/config' as *;
@use '@carbon/styles/scss/spacing' as *;
@use '@carbon/styles/scss/theme' as *;
@use '@carbon/styles/scss/utilities/convert';

@mixin notice-choice {
.#{$prefix}--nc {
max-inline-size: 640px;

p,
.#{$prefix}--checkbox-group {
margin-block-end: $spacing-06;
Expand All @@ -20,5 +22,23 @@
a {
color: $link-primary;
}

// RTL styling
:dir(rtl) {
.#{$prefix}--checkbox-label-text {
padding-inline-end: convert.to-rem(10px);
}

.#{$prefix}--checkbox-label::after {
margin-block-start: 0;
margin-inline-start: convert.to-rem(-1px);
transform-origin: center;
}

.#{$prefix}--checkbox:checked + .#{$prefix}--checkbox-label::after,
.#{$prefix}--checkbox-label[data-contained-checkbox-state='true']::after {
transform: scale(1.2) rotate3d(0.5, 1, 0, 158deg);
}
}
}
}

0 comments on commit c23fad6

Please sign in to comment.