Skip to content

Commit 9386e73

Browse files
authored
fix: removes the delay when the icon changes color when hovering. (#2047)
* fix: removes the delay when the icon changes color when hovering. fixes #2046 * fix: fix also for the backend
1 parent dabf9a8 commit 9386e73

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/styles/block-transitions.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ body.stk--anim-init {
3636
.stk--svg-wrapper :is(.stk--shape-icon, .stk--inner-svg, .stk--inner-svg *) {
3737
transition: all 0.12s cubic-bezier(0.45, 0.05, 0.55, 0.95);
3838
}
39+
// Icons can have a delay in transitions. It's more apparent when transitioning fill, removing it seems to fix this.
40+
.stk--svg-wrapper .stk--inner-svg svg:last-child {
41+
transition: all 0.12s cubic-bezier(0.45, 0.05, 0.55, 0.95), fill 0s;
42+
}
3943
}
4044

4145
// Some attributes will not animate if they have no starting values.

src/styles/editor-block-transitions.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
.stk--svg-wrapper :is(.stk--shape-icon, .stk--inner-svg, .stk--inner-svg *) {
3333
transition: all 0.12s cubic-bezier(0.45, 0.05, 0.55, 0.95);
3434
}
35+
// Icons can have a delay in transitions. It's more apparent when transitioning fill, removing it seems to fix this.
36+
.stk--svg-wrapper .stk--inner-svg svg:last-child {
37+
transition: all 0.12s cubic-bezier(0.45, 0.05, 0.55, 0.95), fill 0s;
38+
}
3539
}
3640

3741
// The transitions above may interfere with Gutenberg transitions like moving

0 commit comments

Comments
 (0)