Skip to content

Commit 7eecd96

Browse files
authored
feat(overlay,commons): deprecate overlay; migrate references to commons (#2429)
- deprecate @spectrum-css/overlay as duplicate of @spectrum-css/commons/overlay.css - @spectrum-css/commons/overlay.css, incorporate fallbacks into the varstacks - @spectrum-css/commons remove basebutton.css and rename basebutton-coretokens.css to basebutton.css - @spectrum-css/commons remove overlay.css and rename overlay-coretokens.css to overlay.css
1 parent e36b348 commit 7eecd96

File tree

38 files changed

+265
-686
lines changed

38 files changed

+265
-686
lines changed

components/actionbutton/index.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
1010
governing permissions and limitations under the License.
1111
*/
1212

13-
@import "../commons/basebutton-coretokens.css";
13+
@import "@spectrum-css/commons/basebutton.css";
1414

1515
.spectrum-ActionButton {
1616
--spectrum-actionbutton-animation-duration: var(--spectrum-animation-duration-100);
@@ -26,13 +26,13 @@ governing permissions and limitations under the License.
2626
--spectrum-actionbutton-focus-indicator-thickness: var(--spectrum-focus-indicator-thickness);
2727
--spectrum-actionbutton-focus-indicator-color: var(--spectrum-focus-indicator-color);
2828
--spectrum-actionbutton-focus-indicator-border-radius: calc(var(--spectrum-actionbutton-border-radius) + var(--spectrum-actionbutton-focus-indicator-gap));
29-
29+
3030
&.is-selected {
3131
--mod-actionbutton-background-color-default: var(--mod-actionbutton-background-color-default-selected, var(--spectrum-neutral-background-color-selected-default));
3232
--mod-actionbutton-background-color-hover: var(--mod-actionbutton-background-color-hover-selected, var(--spectrum-neutral-background-color-selected-hover));
3333
--mod-actionbutton-background-color-down: var(--mod-actionbutton-background-color-down-selected, var(--spectrum-neutral-background-color-selected-down));
3434
--mod-actionbutton-background-color-focus: var(--mod-actionbutton-background-color-focus-selected, var(--spectrum-neutral-background-color-selected-key-focus));
35-
35+
3636
--mod-actionbutton-content-color-default: var(--mod-actionbutton-content-color-default-selected, var(--spectrum-gray-50));
3737
--mod-actionbutton-content-color-hover: var(--mod-actionbutton-content-color-hover-selected, var(--spectrum-gray-50));
3838
--mod-actionbutton-content-color-down: var(--mod-actionbutton-content-color-down-selected, var(--spectrum-gray-50));
@@ -43,7 +43,7 @@ governing permissions and limitations under the License.
4343
--mod-actionbutton-background-color-hover: var(--mod-actionbutton-background-color-hover-selected-emphasized, var(--spectrum-accent-background-color-hover));
4444
--mod-actionbutton-background-color-down: var(--mod-actionbutton-background-color-down-selected-emphasized, var(--spectrum-accent-background-color-down));
4545
--mod-actionbutton-background-color-focus: var(--mod-actionbutton-background-color-focus-selected-emphasized, var(--spectrum-accent-background-color-key-focus));
46-
46+
4747
--mod-actionbutton-content-color-default: var(--mod-actionbutton-content-color-default-selected-emphasized, var(--spectrum-white));
4848
--mod-actionbutton-content-color-hover: var(--mod-actionbutton-content-color-hover-selected-emphasized, var(--spectrum-white));
4949
--mod-actionbutton-content-color-down: var(--mod-actionbutton-content-color-down-selected-emphasized, var(--spectrum-white));
@@ -158,7 +158,7 @@ governing permissions and limitations under the License.
158158
}
159159

160160
.spectrum-ActionButton {
161-
@inherit: %spectrum-BaseButton;
161+
@extend %spectrum-BaseButton;
162162
position: relative;
163163

164164
min-inline-size: var(--mod-actionbutton-min-width, var(--spectrum-actionbutton-min-width));
@@ -203,11 +203,11 @@ governing permissions and limitations under the License.
203203
}
204204

205205
a.spectrum-ActionButton {
206-
@inherit: %spectrum-AnchorButton;
206+
@extend %spectrum-AnchorButton;
207207
}
208208

209209
.spectrum-ActionButton-icon {
210-
@inherit: %spectrum-ButtonIcon;
210+
@extend %spectrum-ButtonIcon;
211211

212212
inline-size: var(--mod-actionbutton-icon-size, var(--spectrum-actionbutton-icon-size));
213213
block-size: var(--mod-actionbutton-icon-size, var(--spectrum-actionbutton-icon-size));
@@ -235,7 +235,7 @@ a.spectrum-ActionButton {
235235
}
236236

237237
.spectrum-ActionButton-label {
238-
@inherit: %spectrum-ButtonLabel;
238+
@extend %spectrum-ButtonLabel;
239239
pointer-events: none;
240240

241241
font-size: var(--mod-actionbutton-font-size, var(--spectrum-actionbutton-font-size));

components/alertdialog/index.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,12 @@ governing permissions and limitations under the License.
6161
}
6262

6363
&--warning {
64+
/* @passthrough */
6465
--mod-icon-color: var(--mod-alert-dialog-warning-icon-color, var(--spectrum-alert-dialog-warning-icon-color));
6566
}
6667

6768
&--error {
69+
/* @passthrough */
6870
--mod-icon-color: var(--mod-alert-dialog-error-icon-color, var(--spectrum-alert-dialog-error-icon-color));
6971
}
7072
}

components/button/index.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
1010
governing permissions and limitations under the License.
1111
*/
1212

13-
@import "../commons/basebutton-coretokens.css";
13+
@import "@spectrum-css/commons/basebutton.css";
1414

1515
/* default for all buttons */
1616
.spectrum-Button {
@@ -92,8 +92,8 @@ governing permissions and limitations under the License.
9292
}
9393

9494
.spectrum-Button {
95-
@inherit: %spectrum-BaseButton;
96-
@inherit: %spectrum-ButtonWithFocusRing;
95+
@extend %spectrum-BaseButton;
96+
@extend %spectrum-ButtonWithFocusRing;
9797

9898
border-radius: var(--mod-button-border-radius, var(--spectrum-button-border-radius));
9999
border-width: var(--mod-button-border-width, var(--spectrum-button-border-width));
@@ -149,11 +149,11 @@ governing permissions and limitations under the License.
149149
}
150150

151151
a.spectrum-Button {
152-
@inherit: %spectrum-AnchorButton;
152+
@extend %spectrum-AnchorButton;
153153
}
154154

155155
.spectrum-Button-label {
156-
@inherit: %spectrum-ButtonLabel;
156+
@extend %spectrum-ButtonLabel;
157157
padding-block-start: calc(var(--mod-button-top-to-text, var(--spectrum-button-top-to-text)) - var(--mod-button-border-width, var(--spectrum-button-border-width)));
158158
padding-block-end: calc(var(--mod-button-bottom-to-text, var(--spectrum-button-bottom-to-text)) - var(--mod-button-border-width, var(--spectrum-button-border-width)));
159159
white-space: nowrap;
@@ -204,7 +204,7 @@ a.spectrum-Button {
204204
/* former skin.css, applied / copied from actionbutton/index.css */
205205

206206
.spectrum-Button {
207-
@inherit: %spectrum-BaseButton;
207+
@extend %spectrum-BaseButton;
208208

209209
background-color: var(--highcontrast-button-background-color-default, var(--mod-button-background-color-default, var(--spectrum-button-background-color-default)));
210210
border-color: var(--highcontrast-button-border-color-default, var(--mod-button-border-color-default, var(--spectrum-button-border-color-default)));

components/closebutton/index.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ governing permissions and limitations under the License.
1515
* .spectrum-Closebutton::after is the Focus ring
1616
*/
1717

18-
@import "../commons/basebutton-coretokens.css";
18+
@import "@spectrum-css/commons/basebutton.css";
1919

2020
.spectrum-CloseButton {
2121
/* Hardcoded tokens */
@@ -127,11 +127,11 @@ governing permissions and limitations under the License.
127127
}
128128

129129
a.spectrum-CloseButton {
130-
@inherit: %spectrum-AnchorButton;
130+
@extend %spectrum-AnchorButton;
131131
}
132132

133133
.spectrum-CloseButton {
134-
@inherit: %spectrum-BaseButton;
134+
@extend %spectrum-BaseButton;
135135

136136
block-size: var(--mod-closebutton-height, var(--spectrum-closebutton-height));
137137
inline-size: var(--mod-closebutton-width, var(--spectrum-closebutton-width));

components/commons/basebutton-coretokens.css

Lines changed: 0 additions & 130 deletions
This file was deleted.

0 commit comments

Comments
 (0)