Skip to content

Commit 6e05e55

Browse files
committed
feat: remove dir polyfill [CSS-222]
1 parent 6bea272 commit 6e05e55

File tree

26 files changed

+73
-134
lines changed

26 files changed

+73
-134
lines changed

.changeset/shiny-taxis-tease.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
"@spectrum-css/actionbutton": major
3+
"@spectrum-css/colorslider": major
4+
"@spectrum-css/progressbar": major
5+
"@spectrum-css/breadcrumb": major
6+
"@spectrum-css/colorloupe": major
7+
"@spectrum-css/colorwheel": major
8+
"@spectrum-css/pagination": major
9+
"@spectrum-css/accordion": major
10+
"@spectrum-css/assetlist": major
11+
"@spectrum-css/colorarea": major
12+
"@spectrum-css/calendar": major
13+
"@spectrum-css/combobox": major
14+
"@spectrum-css/steplist": major
15+
"@spectrum-css/treeview": major
16+
"@spectrum-css/popover": major
17+
"@spectrum-css/tooltip": major
18+
"@spectrum-css/slider": major
19+
"@spectrum-css/switch": major
20+
"@spectrum-css/radio": major
21+
"@spectrum-css/table": major
22+
"@spectrum-css/menu": major
23+
"@spectrum-css/tabs": major
24+
---
25+
26+
This update removes the `dir` attribute polyfill (served via a PostCSS transform to compiled assets) as the fallback is no longer necessary. The`dir` attribute support is available in all supported browsers and has been tested to correctly inherit inside web component shadow DOMs. This is a breaking change **only** to those relying on the `dir` attribute being present for styling, however, the `:dir` pseudo will correctly inherit values from their containers. To correctly determine the `dir` value of a node using JavaScript, you can use `getComputedStyle(node).direction`.

components/accordion/dist/metadata.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
".spectrum-Accordion:dir(rtl)",
3434
".spectrum-Accordion:lang(ja)",
3535
".spectrum-Accordion:lang(ko)",
36-
".spectrum-Accordion:lang(zh)",
37-
"[dir=\"rtl\"] .spectrum-Accordion"
36+
".spectrum-Accordion:lang(zh)"
3837
],
3938
"modifiers": [
4039
"--mod-accordion-animation-duration",

components/actionbutton/dist/metadata.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
".spectrum-ActionButton:has(.spectrum-ActionButton-icon)",
3737
".spectrum-ActionButton:hover",
3838
".spectrum-ActionButton:not(:has(.spectrum-ActionButton-label))",
39-
"[dir=\"rtl\"] .spectrum-ActionButton",
4039
"a.spectrum-ActionButton"
4140
],
4241
"modifiers": [

components/assetlist/dist/metadata.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
".spectrum-AssetList-itemChildIndicator",
2525
".spectrum-AssetList-itemLabel",
2626
".spectrum-AssetList-itemSelector",
27-
".spectrum-AssetList:dir(rtl)",
28-
"[dir=\"rtl\"] .spectrum-AssetList"
27+
".spectrum-AssetList:dir(rtl)"
2928
],
3029
"modifiers": [
3130
"--mod-assetlist-border-color-key-focus",

components/breadcrumb/dist/metadata.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
".spectrum-Breadcrumbs-itemLink[tabindex=\"0\"]:focus-visible",
3030
".spectrum-Breadcrumbs-itemLink[tabindex=\"0\"]:hover",
3131
".spectrum-Breadcrumbs-itemSeparator",
32-
".spectrum-Breadcrumbs-itemSeparator:dir(rtl)",
33-
"[dir=\"rtl\"] .spectrum-Breadcrumbs-itemSeparator"
32+
".spectrum-Breadcrumbs-itemSeparator:dir(rtl)"
3433
],
3534
"modifiers": [
3635
"--mod-breadcrumbs-action-button-color",

components/calendar/dist/metadata.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@
5454
".spectrum-Calendar-tableCell",
5555
".spectrum-Calendar-tableCell:focus",
5656
".spectrum-Calendar-title",
57-
".spectrum-Calendar:dir(rtl)",
58-
"[dir=\"rtl\"] .spectrum-Calendar"
57+
".spectrum-Calendar:dir(rtl)"
5958
],
6059
"modifiers": [
6160
"--mod-calendar-border-radius-reset",

components/colorarea/dist/metadata.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
".spectrum-ColorArea.is-disabled",
1010
".spectrum-ColorArea.is-disabled .spectrum-ColorArea-gradient",
1111
".spectrum-ColorArea.is-focused",
12-
".spectrum-ColorHandle-color",
13-
"[dir=\"rtl\"] .spectrum-ColorArea-handle"
12+
".spectrum-ColorHandle-color"
1413
],
1514
"modifiers": [
1615
"--mod-colorarea-border-color",

components/colorloupe/dist/metadata.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
".spectrum-ColorLoupe-outer-border",
1010
".spectrum-ColorLoupe.is-disabled",
1111
".spectrum-ColorLoupe.is-open",
12-
".spectrum-ColorLoupe:dir(rtl)",
13-
"[dir=\"rtl\"] .spectrum-ColorLoupe"
12+
".spectrum-ColorLoupe:dir(rtl)"
1413
],
1514
"modifiers": [
1615
"--mod-colorloupe-animation-distance",

components/colorslider/dist/metadata.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
".spectrum-ColorSlider.is-disabled",
1414
".spectrum-ColorSlider.is-disabled .spectrum-ColorSlider-checkerboard",
1515
".spectrum-ColorSlider.is-disabled .spectrum-ColorSlider-gradient",
16-
".spectrum-ColorSlider.is-focused",
17-
"[dir=\"rtl\"] .spectrum-ColorSlider-gradient"
16+
".spectrum-ColorSlider.is-focused"
1817
],
1918
"modifiers": [
2019
"--mod-color-slider-background-color-disabled",

components/colorwheel/dist/metadata.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
".spectrum-ColorWheel.is-dragged",
1818
".spectrum-ColorWheel.is-focused",
1919
".spectrum-ColorWheel:after",
20-
".spectrum-ColorWheel:before",
21-
"[dir=\"rtl\"] .spectrum-ColorWheel-ColorArea-handle"
20+
".spectrum-ColorWheel:before"
2221
],
2322
"modifiers": [
2423
"--mod-colorwheel-block-size",

0 commit comments

Comments
 (0)