Skip to content

Commit

Permalink
fix(slider,radio): dir before pseudo element (#2744)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdt2 committed May 22, 2024
1 parent 1d19c7a commit e1ef34f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/neat-windows-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@spectrum-css/slider": patch
"@spectrum-css/radio": patch
---

Includes similar fixes for both Slider and Radio. Some parsers see `:pseudo:dir` as invalid, so we've changed it so that the pseudo element comes last `:dir :pseudo`.
2 changes: 1 addition & 1 deletion components/radio/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ governing permissions and limitations under the License.
opacity var(--mod-radio-animation-duration, var(--spectrum-radio-animation-duration)) ease-out,
margin var(--mod-radio-animation-duration, var(--spectrum-radio-animation-duration)) ease-out;

&:dir(rtl) {
.spectrum-Radio:dir(rtl) & {
transform: translateX(50%) translateY(-50%);
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/slider/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ governing permissions and limitations under the License.

transform: translate(-50%, -50%);

&:dir(rtl) {
.spectrum-Slider:dir(rtl) & {
transform: translate(50%, -50%);
}
}
Expand Down

0 comments on commit e1ef34f

Please sign in to comment.