|
49 | 49 | }
|
50 | 50 |
|
51 | 51 | .spectrum-ActionButton {
|
| 52 | + --spectrum-actionbutton-sized-height: var(--spectrum-component-height-100); |
| 53 | + --spectrum-actionbutton-sized-icon-size: var(--spectrum-workflow-icon-size-100); |
| 54 | + --spectrum-actionbutton-sized-font-size: var(--spectrum-font-size-100); |
| 55 | + --spectrum-actionbutton-sized-text-to-visual: var(--spectrum-text-to-visual-100); |
| 56 | + --spectrum-actionbutton-sized-edge-to-hold-icon: var(--spectrum-action-button-edge-to-hold-icon-medium); |
| 57 | + --spectrum-actionbutton-sized-edge-to-visual: var(--spectrum-component-edge-to-visual-100); |
| 58 | + --spectrum-actionbutton-sized-edge-to-text: var(--spectrum-component-edge-to-text-100); |
| 59 | + --spectrum-actionbutton-sized-edge-to-visual-only: var(--spectrum-component-edge-to-visual-only-100); |
| 60 | + |
52 | 61 | --spectrum-actionbutton-background-color: var(--highcontrast-actionbutton-background-color, var(--mod-actionbutton-background-color-default, var(--spectrum-actionbutton-background-color-default)));
|
53 | 62 | --spectrum-actionbutton-border-color: var(--highcontrast-actionbutton-border-color, var(--mod-actionbutton-border-color-default, var(--spectrum-actionbutton-border-color-default)));
|
54 | 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)); |
55 | 65 |
|
56 | 66 | --spectrum-actionbutton-border-radius: var(--mod-actionbutton-border-radius, var(--spectrum-actionbutton-border-radius-default));
|
57 | 67 | --spectrum-actionbutton-border-width: var(--mod-actionbutton-border-width, var(--spectrum-border-width-100));
|
|
68 | 78 | --spectrum-actionbutton-border-color: transparent;
|
69 | 79 | }
|
70 | 80 |
|
71 |
| - /* Emphasized styles are only applied to the "selected" state of the button and are not applied in static color modes */ |
72 |
| - &.spectrum-ActionButton--emphasized:not(.spectrum-ActionButton--staticBlack, .spectrum-ActionButton--staticWhite) { |
| 81 | + &.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 | + /* note the introduction of a more specific modifier in the following stacks, those should be used instead for customizations */ |
| 88 | + --mod-actionbutton-content-color-default: var(--mod-actionbutton-static-black-content-color, var(--spectrum-black)); |
| 89 | + --mod-actionbutton-content-color-hover: var(--mod-actionbutton-static-black-content-color-hover, var(--spectrum-black)); |
| 90 | + --mod-actionbutton-content-color-down: var(--mod-actionbutton-static-black-content-color-down, var(--spectrum-black)); |
| 91 | + --mod-actionbutton-content-color-focus: var(--mod-actionbutton-static-black-content-color-focus, var(--spectrum-black)); |
| 92 | + |
| 93 | + --mod-actionbutton-content-color-default-selected: var(--mod-actionbutton-static-black-content-color-selected, var(--spectrum-white)); |
| 94 | + --mod-actionbutton-content-color-hover-selected: var(--mod-actionbutton-static-black-content-color-hover-selected, var(--spectrum-white)); |
| 95 | + --mod-actionbutton-content-color-down-selected: var(--mod-actionbutton-static-black-content-color-down-selected, var(--spectrum-white)); |
| 96 | + --mod-actionbutton-content-color-focus-selected: var(--mod-actionbutton-static-black-content-color-focus-selected, var(--spectrum-white)); |
| 97 | + |
| 98 | + --spectrum-actionbutton-content-color-disabled: var(--spectrum-disabled-static-black-content-color); |
| 99 | + --spectrum-actionbutton-focus-indicator-color: var(--spectrum-static-black-focus-indicator-color); |
| 100 | + } |
| 101 | + |
| 102 | + &.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 | + /* note the introduction of a more specific modifier in the following stacks, those should be used instead for customizations */ |
| 110 | + --mod-actionbutton-content-color-default: var(--mod-actionbutton-static-white-content-color, var(--spectrum-white)); |
| 111 | + --mod-actionbutton-content-color-hover: var(--mod-actionbutton-static-white-content-color-hover, var(--spectrum-white)); |
| 112 | + --mod-actionbutton-content-color-down: var(--mod-actionbutton-static-white-content-color-down, var(--spectrum-white)); |
| 113 | + --mod-actionbutton-content-color-focus: var(--mod-actionbutton-static-white-content-color-focus, var(--spectrum-white)); |
| 114 | + |
| 115 | + --mod-actionbutton-content-color-default-selected: var(--mod-actionbutton-static-white-content-color-selected, var(--spectrum-black)); |
| 116 | + --mod-actionbutton-content-color-hover-selected: var(--mod-actionbutton-static-white-content-color-selected, var(--spectrum-black)); |
| 117 | + --mod-actionbutton-content-color-down-selected: var(--mod-actionbutton-static-white-content-color-selected, var(--spectrum-black)); |
| 118 | + --mod-actionbutton-content-color-focus-selected: var(--mod-actionbutton-static-white-content-color-selected, var(--spectrum-black)); |
| 119 | + |
| 120 | + --spectrum-actionbutton-content-color-disabled: var(--spectrum-disabled-static-white-content-color); |
| 121 | + --spectrum-actionbutton-focus-indicator-color: var(--spectrum-static-white-focus-indicator-color); |
| 122 | + } |
| 123 | + |
| 124 | + /* 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 { |
73 | 126 | --mod-actionbutton-background-color-default-selected: var(--mod-actionbutton-background-color-default-selected-emphasized, var(--spectrum-accent-background-color-default));
|
74 | 127 | --mod-actionbutton-background-color-hover-selected: var(--mod-actionbutton-background-color-hover-selected-emphasized, var(--spectrum-accent-background-color-hover));
|
75 | 128 | --mod-actionbutton-background-color-down-selected: var(--mod-actionbutton-background-color-down-selected-emphasized, var(--spectrum-accent-background-color-down));
|
|
81 | 134 | --mod-actionbutton-content-color-focus-selected: var(--mod-actionbutton-content-color-focus-selected-emphasized, var(--spectrum-white));
|
82 | 135 | }
|
83 | 136 |
|
84 |
| - &.spectrum-ActionButton--staticBlack { |
85 |
| - --mod-actionbutton-background-color-default-selected: var(--spectrum-transparent-black-800); |
86 |
| - --mod-actionbutton-background-color-hover-selected: var(--spectrum-transparent-black-900); |
87 |
| - --mod-actionbutton-background-color-down-selected: var(--spectrum-transparent-black-900); |
88 |
| - --mod-actionbutton-background-color-focus-selected: var(--spectrum-transparent-black-900); |
89 |
| - |
90 |
| - --mod-actionbutton-content-color-default: var(--spectrum-black); |
91 |
| - --mod-actionbutton-content-color-hover: var(--spectrum-black); |
92 |
| - --mod-actionbutton-content-color-down: var(--spectrum-black); |
93 |
| - --mod-actionbutton-content-color-focus: var(--spectrum-black); |
94 |
| - --mod-actionbutton-content-color-disabled: var(--spectrum-disabled-static-black-content-color); |
95 |
| - |
96 |
| - --mod-actionbutton-content-color-default-selected: var(--mod-actionbutton-static-content-color, var(--spectrum-white)); |
97 |
| - --mod-actionbutton-content-color-hover-selected: var(--mod-actionbutton-static-content-color, var(--spectrum-white)); |
98 |
| - --mod-actionbutton-content-color-down-selected: var(--mod-actionbutton-static-content-color, var(--spectrum-white)); |
99 |
| - --mod-actionbutton-content-color-focus-selected: var(--mod-actionbutton-static-content-color, var(--spectrum-white)); |
100 |
| - |
101 |
| - --mod-actionbutton-focus-indicator-color: var(--spectrum-static-black-focus-indicator-color); |
102 |
| - } |
103 |
| - |
104 |
| - &.spectrum-ActionButton--staticWhite { |
105 |
| - /* background color _not_ selected is coming from the system theme layer */ |
106 |
| - --mod-actionbutton-background-color-default-selected: var(--spectrum-transparent-white-800); |
107 |
| - --mod-actionbutton-background-color-hover-selected: var(--spectrum-transparent-white-900); |
108 |
| - --mod-actionbutton-background-color-down-selected: var(--spectrum-transparent-white-900); |
109 |
| - --mod-actionbutton-background-color-focus-selected: var(--spectrum-transparent-white-900); |
110 |
| - |
111 |
| - --mod-actionbutton-content-color-default: var(--spectrum-white); |
112 |
| - --mod-actionbutton-content-color-hover: var(--spectrum-white); |
113 |
| - --mod-actionbutton-content-color-down: var(--spectrum-white); |
114 |
| - --mod-actionbutton-content-color-focus: var(--spectrum-white); |
115 |
| - --mod-actionbutton-content-color-disabled: var(--spectrum-disabled-static-white-content-color); |
116 |
| - |
117 |
| - --mod-actionbutton-content-color-default-selected: var(--mod-actionbutton-static-content-color, var(--spectrum-black)); |
118 |
| - --mod-actionbutton-content-color-hover-selected: var(--mod-actionbutton-static-content-color, var(--spectrum-black)); |
119 |
| - --mod-actionbutton-content-color-down-selected: var(--mod-actionbutton-static-content-color, var(--spectrum-black)); |
120 |
| - --mod-actionbutton-content-color-focus-selected: var(--mod-actionbutton-static-content-color, var(--spectrum-black)); |
121 |
| - |
122 |
| - --mod-actionbutton-focus-indicator-color: var(--spectrum-static-white-focus-indicator-color); |
123 |
| - } |
124 |
| - |
125 | 137 | &.is-selected {
|
| 138 | + /* note the introduction of a more specific modifier in the following stacks, those should be used instead for customizations */ |
126 | 139 | --mod-actionbutton-background-color-default: var(--mod-actionbutton-background-color-default-selected, var(--spectrum-actionbutton-background-color-selected));
|
127 | 140 | --mod-actionbutton-background-color-hover: var(--mod-actionbutton-background-color-hover-selected, var(--spectrum-actionbutton-background-color-selected-hover));
|
128 | 141 | --mod-actionbutton-background-color-down: var(--mod-actionbutton-background-color-down-selected, var(--spectrum-actionbutton-background-color-selected-down));
|
129 | 142 | --mod-actionbutton-background-color-focus: var(--mod-actionbutton-background-color-focus-selected, var(--spectrum-actionbutton-background-color-selected-focus));
|
130 |
| - --mod-actionbutton-background-color-disabled: var(--spectrum-actionbutton-background-color-selected-disabled); |
131 |
| - |
132 |
| - --mod-actionbutton-border-color-default: transparent; |
133 |
| - --mod-actionbutton-border-color-hover: transparent; |
134 |
| - --mod-actionbutton-border-color-down: transparent; |
135 |
| - --mod-actionbutton-border-color-focus: transparent; |
136 |
| - --mod-actionbutton-border-color-disabled: transparent; |
137 | 143 |
|
138 | 144 | --mod-actionbutton-content-color-default: var(--mod-actionbutton-content-color-default-selected, var(--spectrum-actionbutton-content-color-selected));
|
139 | 145 | --mod-actionbutton-content-color-hover: var(--mod-actionbutton-content-color-hover-selected, var(--spectrum-actionbutton-content-color-selected));
|
140 | 146 | --mod-actionbutton-content-color-down: var(--mod-actionbutton-content-color-down-selected, var(--spectrum-actionbutton-content-color-selected));
|
141 | 147 | --mod-actionbutton-content-color-focus: var(--mod-actionbutton-content-color-focus-selected, var(--spectrum-actionbutton-content-color-selected));
|
| 148 | + |
| 149 | + --spectrum-actionbutton-background-color-disabled: var(--spectrum-actionbutton-background-color-selected-disabled); |
| 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; |
142 | 156 | }
|
143 | 157 |
|
144 | 158 | &:hover {
|
| 159 | + /* note the introduction of a more specific modifier in the following stacks, those should be used instead for customizations */ |
145 | 160 | --mod-actionbutton-background-color-default: var(--mod-actionbutton-background-color-hover, var(--spectrum-actionbutton-background-color-hover));
|
146 | 161 | --mod-actionbutton-border-color-default: var(--mod-actionbutton-border-color-hover, var(--spectrum-actionbutton-border-color-hover));
|
147 | 162 | --mod-actionbutton-content-color-default: var(--mod-actionbutton-content-color-hover, var(--spectrum-neutral-content-color-hover));
|
148 | 163 | }
|
149 | 164 |
|
150 | 165 | &:focus-visible {
|
| 166 | + /* note the introduction of a more specific modifier in the following stacks, those should be used instead for customizations */ |
151 | 167 | --mod-actionbutton-background-color-default: var(--mod-actionbutton-background-color-focus, var(--spectrum-actionbutton-background-color-focus));
|
152 | 168 | --mod-actionbutton-border-color-default: var(--mod-actionbutton-border-color-focus, var(--spectrum-actionbutton-border-color-focus));
|
153 | 169 | --mod-actionbutton-content-color-default: var(--mod-actionbutton-content-color-focus, var(--spectrum-neutral-content-color-key-focus));
|
154 | 170 | }
|
155 | 171 |
|
156 | 172 | &:active {
|
| 173 | + /* note the introduction of a more specific modifier in the following stacks, those should be used instead for customizations */ |
157 | 174 | --mod-actionbutton-background-color-default: var(--mod-actionbutton-background-color-down, var(--spectrum-actionbutton-background-color-down));
|
158 | 175 | --mod-actionbutton-border-color-default: var(--mod-actionbutton-border-color-down, var(--spectrum-actionbutton-border-color-down));
|
159 | 176 | --mod-actionbutton-content-color-default: var(--mod-actionbutton-content-color-down, var(--spectrum-neutral-content-color-down));
|
160 | 177 | }
|
161 | 178 |
|
162 | 179 | &:disabled,
|
163 | 180 | &.is-disabled {
|
| 181 | + /* note the introduction of a more specific modifier in the following stacks, those should be used instead for customizations */ |
164 | 182 | --mod-actionbutton-background-color-default: var(--mod-actionbutton-background-color-disabled, var(--spectrum-actionbutton-background-color-disabled));
|
165 | 183 | --mod-actionbutton-border-color-default: var(--mod-actionbutton-border-color-disabled, var(--spectrum-actionbutton-border-color-disabled));
|
166 |
| - --mod-actionbutton-content-color-default: var(--mod-actionbutton-content-color-disabled, var(--spectrum-disabled-content-color)); |
| 184 | + --mod-actionbutton-content-color-default: var(--mod-actionbutton-content-color-disabled, var(--spectrum-actionbutton-content-color-disabled)); |
167 | 185 | }
|
168 | 186 | }
|
169 | 187 |
|
170 |
| -.spectrum-ActionButton, |
171 |
| -.spectrum-ActionButton--sizeM { |
172 |
| - --spectrum-actionbutton-sized-height: var(--spectrum-component-height-100); |
173 |
| - --spectrum-actionbutton-sized-icon-size: var(--spectrum-workflow-icon-size-100); |
174 |
| - --spectrum-actionbutton-sized-font-size: var(--spectrum-font-size-100); |
175 |
| - --spectrum-actionbutton-sized-text-to-visual: var(--spectrum-text-to-visual-100); |
176 |
| - --spectrum-actionbutton-sized-edge-to-hold-icon: var(--spectrum-action-button-edge-to-hold-icon-medium); |
177 |
| - --spectrum-actionbutton-sized-edge-to-visual: var(--spectrum-component-edge-to-visual-100); |
178 |
| - --spectrum-actionbutton-sized-edge-to-text: var(--spectrum-component-edge-to-text-100); |
179 |
| - --spectrum-actionbutton-sized-edge-to-visual-only: var(--spectrum-component-edge-to-visual-only-100); |
180 |
| -} |
181 |
| - |
182 | 188 | .spectrum-ActionButton--sizeXS {
|
183 | 189 | --spectrum-actionbutton-sized-height: var(--spectrum-component-height-50);
|
184 | 190 | --spectrum-actionbutton-sized-icon-size: var(--spectrum-workflow-icon-size-50);
|
|
0 commit comments