Skip to content

Commit 5a34fa4

Browse files
authored
fix: correct OverBackground ClearButton focus-ring, fixes #730 (#733)
1 parent 8f7255a commit 5a34fa4

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

components/button/index.css

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,6 @@ governing permissions and limitations under the License.
157157
}
158158
}
159159

160-
.spectrum-ClearButton--overBackground {
161-
&:focus-ring {
162-
&:after {
163-
/* Adjust margin because ClearButton does not have a border */
164-
margin: calc(var(--spectrum-alias-focus-ring-gap) * -1);
165-
}
166-
}
167-
}
168-
169160
a.spectrum-Button,
170161
a.spectrum-ActionButton {
171162
/* Remove appearance for clickable types in iOS and Safari. */
@@ -327,6 +318,7 @@ a.spectrum-ActionButton {
327318

328319
.spectrum-ClearButton {
329320
@inherit: %spectrum-BaseButton;
321+
@inherit: %spectrum-ButtonWithFocusRing;
330322

331323
inline-size: var(--spectrum-clearbutton-medium-width);
332324
block-size: var(--spectrum-clearbutton-medium-height);
@@ -345,6 +337,15 @@ a.spectrum-ActionButton {
345337
}
346338
}
347339

340+
.spectrum-ClearButton--overBackground {
341+
&:focus-ring {
342+
&:after {
343+
/* Adjust margin because ClearButton does not have a border */
344+
margin: calc(var(--spectrum-alias-focus-ring-gap) * -1);
345+
}
346+
}
347+
}
348+
348349
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
349350
.spectrum-ClearButton {
350351
> .spectrum-Icon {

0 commit comments

Comments
 (0)