|
58 | 58 | --spectrum-actionbutton-sized-edge-to-text: var(--spectrum-component-edge-to-text-100);
|
59 | 59 | --spectrum-actionbutton-sized-edge-to-visual-only: var(--spectrum-component-edge-to-visual-only-100);
|
60 | 60 |
|
61 |
| - --spectrum-actionbutton-background-color: var(--highcontrast-actionbutton-background-color, var(--mod-actionbutton-background-color-default, var(--spectrum-actionbutton-background-color-default))); |
62 |
| - --spectrum-actionbutton-border-color: var(--highcontrast-actionbutton-border-color, var(--mod-actionbutton-border-color-default, var(--spectrum-actionbutton-border-color-default))); |
63 |
| - --spectrum-actionbutton-content-color: var(--highcontrast-actionbutton-content-color, var(--mod-actionbutton-content-color-default, var(--spectrum-neutral-content-color-default))); |
64 |
| - --spectrum-actionbutton-content-color-disabled: var(--mod-actionbutton-content-color-disabled, var(--spectrum-disabled-content-color)); |
65 |
| - |
66 |
| - --spectrum-actionbutton-border-radius: var(--mod-actionbutton-border-radius, var(--spectrum-actionbutton-border-radius-default)); |
67 |
| - --spectrum-actionbutton-border-width: var(--mod-actionbutton-border-width, var(--spectrum-border-width-100)); |
68 |
| - |
69 |
| - --spectrum-actionbutton-focus-indicator-gap: var(--mod-actionbutton-focus-indicator-gap, var(--spectrum-focus-indicator-gap)); |
70 |
| - --spectrum-actionbutton-focus-indicator-thickness: var(--mod-actionbutton-focus-indicator-thickness, var(--spectrum-focus-indicator-thickness)); |
71 |
| - --spectrum-actionbutton-focus-indicator-color: var(--highcontrast-actionbutton-focus-indicator-color, var(--mod-actionbutton-focus-indicator-color, var(--spectrum-focus-indicator-color))); |
72 |
| - |
73 | 61 | &:dir(rtl) {
|
74 | 62 | --spectrum-logical-rotation: matrix(-1, 0, 0, 1, 0, 0);
|
75 | 63 | }
|
|
79 | 67 | }
|
80 | 68 |
|
81 | 69 | &.spectrum-ActionButton--staticBlack {
|
82 |
| - --spectrum-actionbutton-background-color-default-selected: var(--spectrum-transparent-black-800); |
83 |
| - --spectrum-actionbutton-background-color-hover-selected: var(--spectrum-transparent-black-900); |
84 |
| - --spectrum-actionbutton-background-color-down-selected: var(--spectrum-transparent-black-900); |
85 |
| - --spectrum-actionbutton-background-color-focus-selected: var(--spectrum-transparent-black-900); |
86 |
| - |
87 | 70 | /* note the introduction of a more specific modifier in the following stacks, those should be used instead for customizations */
|
88 | 71 | --mod-actionbutton-content-color-default: var(--mod-actionbutton-static-black-content-color, var(--spectrum-black));
|
89 | 72 | --mod-actionbutton-content-color-hover: var(--mod-actionbutton-static-black-content-color-hover, var(--spectrum-black));
|
|
100 | 83 | }
|
101 | 84 |
|
102 | 85 | &.spectrum-ActionButton--staticWhite {
|
103 |
| - /* background color _not_ selected is coming from the system theme layer */ |
104 |
| - --spectrum-actionbutton-background-color-default-selected: var(--spectrum-transparent-white-800); |
105 |
| - --spectrum-actionbutton-background-color-hover-selected: var(--spectrum-transparent-white-900); |
106 |
| - --spectrum-actionbutton-background-color-down-selected: var(--spectrum-transparent-white-900); |
107 |
| - --spectrum-actionbutton-background-color-focus-selected: var(--spectrum-transparent-white-900); |
108 |
| - |
109 | 86 | /* note the introduction of a more specific modifier in the following stacks, those should be used instead for customizations */
|
110 | 87 | --mod-actionbutton-content-color-default: var(--mod-actionbutton-static-white-content-color, var(--spectrum-white));
|
111 | 88 | --mod-actionbutton-content-color-hover: var(--mod-actionbutton-static-white-content-color-hover, var(--spectrum-white));
|
|
122 | 99 | }
|
123 | 100 |
|
124 | 101 | /* Emphasized styles are only applied to the "selected" state of the button and are not applied in static color modes; must list after static variants */
|
125 |
| - &.spectrum-ActionButton--emphasized { |
| 102 | + &.spectrum-ActionButton--emphasized:not(.spectrum-ActionButton--staticBlack, .spectrum-ActionButton--staticWhite) { |
126 | 103 | --mod-actionbutton-background-color-default-selected: var(--mod-actionbutton-background-color-default-selected-emphasized, var(--spectrum-accent-background-color-default));
|
127 | 104 | --mod-actionbutton-background-color-hover-selected: var(--mod-actionbutton-background-color-hover-selected-emphasized, var(--spectrum-accent-background-color-hover));
|
128 | 105 | --mod-actionbutton-background-color-down-selected: var(--mod-actionbutton-background-color-down-selected-emphasized, var(--spectrum-accent-background-color-down));
|
|
134 | 111 | --mod-actionbutton-content-color-focus-selected: var(--mod-actionbutton-content-color-focus-selected-emphasized, var(--spectrum-white));
|
135 | 112 | }
|
136 | 113 |
|
137 |
| - &.is-selected { |
138 |
| - /* note the introduction of a more specific modifier in the following stacks, those should be used instead for customizations */ |
139 |
| - --mod-actionbutton-background-color-default: var(--mod-actionbutton-background-color-default-selected, var(--spectrum-actionbutton-background-color-selected)); |
140 |
| - --mod-actionbutton-background-color-hover: var(--mod-actionbutton-background-color-hover-selected, var(--spectrum-actionbutton-background-color-selected-hover)); |
141 |
| - --mod-actionbutton-background-color-down: var(--mod-actionbutton-background-color-down-selected, var(--spectrum-actionbutton-background-color-selected-down)); |
142 |
| - --mod-actionbutton-background-color-focus: var(--mod-actionbutton-background-color-focus-selected, var(--spectrum-actionbutton-background-color-selected-focus)); |
143 |
| - --mod-actionbutton-background-color-disabled: var(--mod-actionbutton-background-color-selected-disabled, var(--spectrum-actionbutton-background-color-selected-disabled)); |
144 |
| - |
145 |
| - /* @deprecated --mod-actionbutton-static-content-color in favor of the more specific, state-based alternatives */ |
146 |
| - --mod-actionbutton-content-color-default: var(--mod-actionbutton-content-color-default-selected, var(--mod-actionbutton-static-content-color, var(--spectrum-actionbutton-content-color-selected))); |
147 |
| - --mod-actionbutton-content-color-hover: var(--mod-actionbutton-content-color-hover-selected, var(--mod-actionbutton-static-content-color, var(--spectrum-actionbutton-content-color-selected))); |
148 |
| - --mod-actionbutton-content-color-down: var(--mod-actionbutton-content-color-down-selected, var(--mod-actionbutton-static-content-color, var(--spectrum-actionbutton-content-color-selected))); |
149 |
| - --mod-actionbutton-content-color-focus: var(--mod-actionbutton-content-color-focus-selected, var(--mod-actionbutton-static-content-color, var(--spectrum-actionbutton-content-color-selected))); |
150 |
| - |
151 |
| - --spectrum-actionbutton-border-color-default: transparent; |
152 |
| - --spectrum-actionbutton-border-color-hover: transparent; |
153 |
| - --spectrum-actionbutton-border-color-down: transparent; |
154 |
| - --spectrum-actionbutton-border-color-focus: transparent; |
155 |
| - --spectrum-actionbutton-border-color-disabled: transparent; |
156 |
| - } |
157 |
| - |
158 | 114 | &:hover {
|
159 | 115 | /* note the introduction of a more specific modifier in the following stacks, those should be used instead for customizations */
|
160 | 116 | --mod-actionbutton-background-color-default: var(--mod-actionbutton-background-color-hover, var(--spectrum-actionbutton-background-color-hover));
|
|
181 | 137 | /* note the introduction of a more specific modifier in the following stacks, those should be used instead for customizations */
|
182 | 138 | --mod-actionbutton-background-color-default: var(--mod-actionbutton-background-color-disabled, var(--spectrum-actionbutton-background-color-disabled));
|
183 | 139 | --mod-actionbutton-border-color-default: var(--mod-actionbutton-border-color-disabled, var(--spectrum-actionbutton-border-color-disabled));
|
184 |
| - --mod-actionbutton-content-color-default: var(--mod-actionbutton-content-color-disabled, var(--spectrum-actionbutton-content-color-disabled)); |
| 140 | + --mod-actionbutton-content-color-default: var(--mod-actionbutton-content-color-disabled, var(--spectrum-actionbutton-content-color-disabled, var(--spectrum-disabled-content-color))); |
| 141 | + } |
| 142 | + |
| 143 | + &.is-selected { |
| 144 | + /* note the introduction of a more specific modifier in the following stacks, those should be used instead for customizations */ |
| 145 | + --mod-actionbutton-background-color-default: var(--mod-actionbutton-background-color-default-selected, var(--spectrum-actionbutton-background-color-selected)); |
| 146 | + --mod-actionbutton-background-color-hover: var(--mod-actionbutton-background-color-hover-selected, var(--spectrum-actionbutton-background-color-selected-hover)); |
| 147 | + --mod-actionbutton-background-color-down: var(--mod-actionbutton-background-color-down-selected, var(--spectrum-actionbutton-background-color-selected-down)); |
| 148 | + --mod-actionbutton-background-color-focus: var(--mod-actionbutton-background-color-focus-selected, var(--spectrum-actionbutton-background-color-selected-focus)); |
| 149 | + --mod-actionbutton-background-color-disabled: var(--mod-actionbutton-background-color-selected-disabled, var(--spectrum-actionbutton-background-color-selected-disabled)); |
| 150 | + |
| 151 | + /* @deprecated --mod-actionbutton-static-content-color in favor of the more specific, state-based alternatives */ |
| 152 | + --mod-actionbutton-content-color-default: var(--mod-actionbutton-content-color-default-selected, var(--mod-actionbutton-static-content-color, var(--spectrum-actionbutton-content-color-selected))); |
| 153 | + --mod-actionbutton-content-color-hover: var(--mod-actionbutton-content-color-hover-selected, var(--mod-actionbutton-static-content-color, var(--spectrum-actionbutton-content-color-selected))); |
| 154 | + --mod-actionbutton-content-color-down: var(--mod-actionbutton-content-color-down-selected, var(--mod-actionbutton-static-content-color, var(--spectrum-actionbutton-content-color-selected))); |
| 155 | + --mod-actionbutton-content-color-focus: var(--mod-actionbutton-content-color-focus-selected, var(--mod-actionbutton-static-content-color, var(--spectrum-actionbutton-content-color-selected))); |
| 156 | + |
| 157 | + --spectrum-actionbutton-border-color-default: transparent; |
| 158 | + --spectrum-actionbutton-border-color-hover: transparent; |
| 159 | + --spectrum-actionbutton-border-color-down: transparent; |
| 160 | + --spectrum-actionbutton-border-color-focus: transparent; |
| 161 | + --spectrum-actionbutton-border-color-disabled: transparent; |
185 | 162 | }
|
186 | 163 | }
|
187 | 164 |
|
|
230 | 207 | }
|
231 | 208 |
|
232 | 209 | .spectrum-ActionButton {
|
| 210 | + --spectrum-actionbutton-content-color-disabled: var(--mod-actionbutton-content-color-disabled, var(--spectrum-disabled-content-color)); |
| 211 | + |
| 212 | + --spectrum-actionbutton-border-radius: var(--mod-actionbutton-border-radius, var(--spectrum-actionbutton-border-radius-default)); |
| 213 | + --spectrum-actionbutton-border-width: var(--mod-actionbutton-border-width, var(--spectrum-border-width-100)); |
| 214 | + |
| 215 | + --spectrum-actionbutton-focus-indicator-gap: var(--mod-actionbutton-focus-indicator-gap, var(--spectrum-focus-indicator-gap)); |
| 216 | + --spectrum-actionbutton-focus-indicator-thickness: var(--mod-actionbutton-focus-indicator-thickness, var(--spectrum-focus-indicator-thickness)); |
| 217 | + --spectrum-actionbutton-focus-indicator-color: var(--highcontrast-actionbutton-focus-indicator-color, var(--mod-actionbutton-focus-indicator-color, var(--spectrum-focus-indicator-color))); |
| 218 | + |
233 | 219 | /* Variables leveraging t-shirt sizing */
|
234 | 220 | --spectrum-actionbutton-height: var(--mod-actionbutton-height, var(--spectrum-actionbutton-sized-height));
|
235 | 221 | --spectrum-actionbutton-icon-size: var(--mod-actionbutton-icon-size, var(--spectrum-actionbutton-sized-icon-size));
|
|
256 | 242 | /* Start with text-only padding */
|
257 | 243 | padding-inline: var(--spectrum-actionbutton-edge-to-text);
|
258 | 244 |
|
259 |
| - background-color: var(--spectrum-actionbutton-background-color); |
260 |
| - border-color: var(--spectrum-actionbutton-border-color); |
261 |
| - color: var(--spectrum-actionbutton-content-color); |
| 245 | + background-color: var(--highcontrast-actionbutton-background-color, var(--mod-actionbutton-background-color-default, var(--spectrum-actionbutton-background-color-default))); |
| 246 | + border-color: var(--highcontrast-actionbutton-border-color, var(--mod-actionbutton-border-color-default, var(--spectrum-actionbutton-border-color-default))); |
| 247 | + color: var(--highcontrast-actionbutton-content-color, var(--mod-actionbutton-content-color-default, var(--spectrum-neutral-content-color-default))); |
262 | 248 |
|
263 | 249 | transition: border-color var(--mod-actionbutton-animation-duration, var(--spectrum-animation-duration-100)) ease-in-out;
|
264 | 250 |
|
|
0 commit comments