Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 7ab3246

Browse files
chore: Add rtl-ignore directives to transform:rotate() styles so they aren't affected by RTLCSS.
PiperOrigin-RevId: 511239387
1 parent 066d943 commit 7ab3246

File tree

6 files changed

+29
-0
lines changed

6 files changed

+29
-0
lines changed

packages/mdc-checkbox/_checkbox.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
@use '@material/dom/dom';
3232
@use '@material/feature-targeting/feature-targeting';
3333
@use '@material/focus-ring/focus-ring';
34+
@use '@material/rtl/rtl';
3435
@use '@material/ripple/ripple';
3536
@use '@material/ripple/ripple-theme';
3637
@use '@material/touch-target/mixins' as touch-target-mixins;
@@ -462,6 +463,7 @@
462463
$feat-structure: feature-targeting.create-target($query, structure);
463464

464465
@include feature-targeting.targets($feat-structure) {
466+
@include rtl.ignore-next-line();
465467
transform: rotate(45deg);
466468
opacity: 0;
467469
}
@@ -511,6 +513,7 @@
511513
@include feature-targeting.targets($feat-structure) {
512514
width: 100%;
513515
height: 0;
516+
@include rtl.ignore-next-line();
514517
transform: scaleX(0) rotate(0deg);
515518
border-width: math.div(math.floor(checkbox-theme.$mark-stroke-size), 2);
516519
border-style: solid;
@@ -523,10 +526,12 @@
523526
}
524527

525528
@mixin mixedmark--checked_ {
529+
@include rtl.ignore-next-line();
526530
transform: scaleX(1) rotate(-45deg);
527531
}
528532

529533
@mixin mixedmark--indeterminate_ {
534+
@include rtl.ignore-next-line();
530535
transform: scaleX(1) rotate(0deg);
531536
opacity: 1;
532537
}
@@ -598,11 +603,13 @@ $indeterminate-checked-easing-function_: cubic-bezier(0.14, 0, 0, 1) !default;
598603
@keyframes mdc-checkbox-checked-indeterminate-checkmark {
599604
from {
600605
animation-timing-function: animation-variables.$deceleration-curve-timing-function;
606+
@include rtl.ignore-next-line();
601607
transform: rotate(0deg);
602608
opacity: 1;
603609
}
604610

605611
to {
612+
@include rtl.ignore-next-line();
606613
transform: rotate(45deg);
607614
opacity: 0;
608615
}
@@ -611,11 +618,13 @@ $indeterminate-checked-easing-function_: cubic-bezier(0.14, 0, 0, 1) !default;
611618
@keyframes mdc-checkbox-indeterminate-checked-checkmark {
612619
from {
613620
animation-timing-function: $indeterminate-checked-easing-function_;
621+
@include rtl.ignore-next-line();
614622
transform: rotate(45deg);
615623
opacity: 0;
616624
}
617625

618626
to {
627+
@include rtl.ignore-next-line();
619628
transform: rotate(360deg);
620629
opacity: 1;
621630
}
@@ -624,11 +633,13 @@ $indeterminate-checked-easing-function_: cubic-bezier(0.14, 0, 0, 1) !default;
624633
@keyframes mdc-checkbox-checked-indeterminate-mixedmark {
625634
from {
626635
animation-timing-function: mdc-animation-deceleration-curve-timing-function;
636+
@include rtl.ignore-next-line();
627637
transform: rotate(-45deg);
628638
opacity: 0;
629639
}
630640

631641
to {
642+
@include rtl.ignore-next-line();
632643
transform: rotate(0deg);
633644
opacity: 1;
634645
}
@@ -637,11 +648,13 @@ $indeterminate-checked-easing-function_: cubic-bezier(0.14, 0, 0, 1) !default;
637648
@keyframes mdc-checkbox-indeterminate-checked-mixedmark {
638649
from {
639650
animation-timing-function: $indeterminate-checked-easing-function_;
651+
@include rtl.ignore-next-line();
640652
transform: rotate(0deg);
641653
opacity: 1;
642654
}
643655

644656
to {
657+
@include rtl.ignore-next-line();
645658
transform: rotate(315deg);
646659
opacity: 0;
647660
}

packages/mdc-checkbox/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"@material/feature-targeting": "^14.0.0",
2525
"@material/focus-ring": "^14.0.0",
2626
"@material/ripple": "^14.0.0",
27+
"@material/rtl": "^14.0.0",
2728
"@material/theme": "^14.0.0",
2829
"@material/touch-target": "^14.0.0",
2930
"tslib": "^2.1.0"

packages/mdc-circular-progress/_circular-progress.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888

8989
.mdc-circular-progress__determinate-container {
9090
@include feature-targeting.targets($feat-structure) {
91+
@include rtl.ignore-next-line();
9192
transform: rotate(-90deg);
9293
}
9394
}
@@ -133,6 +134,7 @@
133134
@include rtl.ignore-next-line();
134135
left: -900%;
135136
width: 2000%;
137+
@include rtl.ignore-next-line();
136138
transform: rotate(180deg);
137139
}
138140
}
@@ -265,6 +267,7 @@
265267
@mixin container-rotate-keyframes_ {
266268
@keyframes mdc-circular-progress-container-rotate {
267269
to {
270+
@include rtl.ignore-next-line();
268271
transform: rotate(360deg);
269272
}
270273
}
@@ -276,6 +279,7 @@
276279
@keyframes mdc-circular-progress-spinner-layer-rotate {
277280
@for $i from 1 through 8 {
278281
#{$i * 12.5}% {
282+
@include rtl.ignore-next-line();
279283
transform: rotate($i * 0.5 * circular-progress-theme.$arc-size);
280284
}
281285
}
@@ -389,12 +393,15 @@
389393
@mixin left-spin-keyframes_ {
390394
@keyframes mdc-circular-progress-left-spin {
391395
from {
396+
@include rtl.ignore-next-line();
392397
transform: rotate(265deg);
393398
}
394399
50% {
400+
@include rtl.ignore-next-line();
395401
transform: rotate(130deg);
396402
}
397403
to {
404+
@include rtl.ignore-next-line();
398405
transform: rotate(265deg);
399406
}
400407
}
@@ -406,12 +413,15 @@
406413
@mixin right-spin-keyframes_ {
407414
@keyframes mdc-circular-progress-right-spin {
408415
from {
416+
@include rtl.ignore-next-line();
409417
transform: rotate(-265deg);
410418
}
411419
50% {
420+
@include rtl.ignore-next-line();
412421
transform: rotate(-130deg);
413422
}
414423
to {
424+
@include rtl.ignore-next-line();
415425
transform: rotate(-265deg);
416426
}
417427
}

packages/mdc-data-table/_data-table-header-cell.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989

9090
@include feature-targeting.targets($feat-structure) {
9191
// Apply dummy `transform` to avoid pixel shift on sort down animation.
92+
@include rtl.ignore-next-line();
9293
transform: rotate(0.0001deg);
9394
}
9495

@@ -108,6 +109,7 @@
108109

109110
.mdc-data-table__header-cell--sorted-descending & {
110111
@include feature-targeting.targets($feat-structure) {
112+
@include rtl.ignore-next-line();
111113
transform: rotate(-180deg);
112114
}
113115
}

packages/mdc-linear-progress/_linear-progress.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@
120120
background-repeat: repeat-x;
121121
// background-size: 10px variables.$height;
122122
flex: auto;
123+
@include rtl.ignore-next-line();
123124
transform: rotate(180deg);
124125
}
125126

@@ -278,6 +279,7 @@
278279
}
279280

280281
@include feature-targeting.targets($feat-structure) {
282+
@include rtl.ignore-next-line();
281283
transform: rotate(0);
282284
}
283285
}

packages/mdc-tooltip/_tooltip.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ $_caret-size: 24px;
222222
// We override this transform in MDCTooltipFoundation, however these
223223
// styles must be present before the override happens in order to
224224
// calculate the correct boundingClientRect (with the transforms applied).
225+
@include rtl.ignore-next-line();
225226
transform: rotate(35deg) skewY(20deg) scaleX(math.cos(20deg));
226227
}
227228
}

0 commit comments

Comments
 (0)