Skip to content

Commit 0ebd93b

Browse files
fix(button): avoid overriding styles on SVGS with paths (#7632)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent aa4ab1d commit 0ebd93b

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

packages/components/src/components/button/_button.scss

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,6 @@
162162
}
163163
}
164164

165-
.#{$prefix}--btn.#{$prefix}--btn--icon-only.#{$prefix}--btn--ghost:focus svg,
166-
.#{$prefix}--btn.#{$prefix}--btn--icon-only.#{$prefix}--btn--ghost:hover svg {
167-
fill: $icon-01;
168-
}
169-
170165
.#{$prefix}--btn.#{$prefix}--btn--icon-only.#{$prefix}--tooltip__trigger:focus {
171166
border-color: $focus;
172167

@@ -224,8 +219,6 @@
224219
.#{$prefix}--btn__icon,
225220
.#{$prefix}--btn.#{$prefix}--btn--icon-only.#{$prefix}--btn--ghost:hover
226221
.#{$prefix}--btn__icon {
227-
fill: $icon-01;
228-
229222
// Windows, Firefox HCM Fix
230223
@media screen and (-ms-high-contrast: active),
231224
screen and (prefers-contrast) {
@@ -238,7 +231,7 @@
238231

239232
.#{$prefix}--btn--ghost.#{$prefix}--btn--icon-only
240233
.#{$prefix}--btn__icon
241-
path,
234+
path:not([data-icon-path]),
242235
.#{$prefix}--btn--ghost.#{$prefix}--btn--icon-only .#{$prefix}--btn__icon {
243236
fill: $icon-01;
244237
}

packages/components/src/components/button/_mixins.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
}
9797

9898
.#{$prefix}--btn__icon,
99-
.#{$prefix}--btn__icon path {
99+
.#{$prefix}--btn__icon path:not([data-icon-path]) {
100100
fill: $icon-color;
101101
}
102102
}

0 commit comments

Comments
 (0)