Skip to content

Commit 53fd9ce

Browse files
committed
Adds back highlight color animation
1 parent c2011bd commit 53fd9ce

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/index.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ module.exports = plugin.withOptions(
44
({
55
animationDuration = "0.6s",
66
enableAnimation = true,
7-
highlightColor = "#f16bc9",
7+
highlightColorStart = "#f16bc9",
8+
highlightColorEnd = "#f71fb6",
89
widthStart = "8px",
910
widthEnd = "12px",
1011
} = {}) => {
@@ -24,18 +25,20 @@ module.exports = plugin.withOptions(
2425
[`.${e("?")}`]: {
2526
"outline-style": OUTLINE_STYLE,
2627
"outline-width": widthStart,
27-
"outline-color": highlightColor,
28-
"box-shadow": `inset ${BOX_SHADOW_INSET_START} ${BOX_SHADOW_INSET_START} ${highlightColor}, inset -${BOX_SHADOW_INSET_START} -${BOX_SHADOW_INSET_START} ${highlightColor}`,
28+
"outline-color": highlightColorStart,
29+
"box-shadow": `inset ${BOX_SHADOW_INSET_START} ${BOX_SHADOW_INSET_START} ${highlightColorStart}, inset -${BOX_SHADOW_INSET_START} -${BOX_SHADOW_INSET_START} ${highlightColor}`,
2930
animation: animation,
3031
},
3132
[`@keyframes ${e("?")}${ANIMATION_NAME}`]: {
3233
"0%": {
3334
"outline-width": widthStart,
34-
"box-shadow": `inset ${BOX_SHADOW_INSET_START} ${BOX_SHADOW_INSET_START} ${highlightColor}, inset -${BOX_SHADOW_INSET_START} -${BOX_SHADOW_INSET_START} ${highlightColor}`,
35+
"outline-color": highlightColorStart,
36+
"box-shadow": `inset ${BOX_SHADOW_INSET_START} ${BOX_SHADOW_INSET_START} ${highlightColorStart}, inset -${BOX_SHADOW_INSET_START} -${BOX_SHADOW_INSET_START} ${highlightColor}`,
3537
},
3638
"100%": {
3739
"outline-width": widthEnd,
38-
"box-shadow": `inset ${BOX_SHADOW_INSET_END} ${BOX_SHADOW_INSET_END} ${highlightColor}, inset -${BOX_SHADOW_INSET_END} -${BOX_SHADOW_INSET_END} ${highlightColor}`,
40+
"outline-color": highlightColorEnd,
41+
"box-shadow": `inset ${BOX_SHADOW_INSET_END} ${BOX_SHADOW_INSET_END} ${highlightColorEnd}, inset -${BOX_SHADOW_INSET_END} -${BOX_SHADOW_INSET_END} ${highlightColor}`,
3942
},
4043
},
4144
});

0 commit comments

Comments
 (0)