Skip to content

Commit 0573003

Browse files
committed
feat: improve edit on click styles
1 parent 9c0cee2 commit 0573003

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

app-src/scripts/edit-on-click/_edit-on-click-d.scss

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11
[edit-on-click-duration],
22
[edit-on-click] {
33
cursor: text;
4-
transition: padding 0.20s $ease-in-out-quint;
4+
transition: all 0.20s $ease-in-out-quint;
55
display: block;
66
caret-color: #000000;
7+
background: inherit;
8+
border: 1px solid transparent;
79

810
@include dark-theme() {
911
caret-color: #ffffff;
1012
}
1113

1214
&:focus {
15+
position: relative;
16+
z-index: 3;
1317
user-select: all;
14-
padding-left: 6px !important;
18+
border: 1px solid black;
19+
transform: scale(1.05);
20+
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.8), 3px 3px 10px 0 rgba(0, 0, 0, 0.6);
21+
@include dark-theme() {
22+
border: 1px solid #ffffff;
23+
box-shadow: 0 0 4px 0 rgba(255, 255, 255, 0.8), 3px 3px 10px 0 rgba(255, 255, 255, 0.6);
24+
background: $dark-theme-bg-darker;
25+
}
1526

16-
animation: toggle-edit-on-click-ani 0.15s $ease-in-out-quint;
17-
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.8), 3px 3px 10px 0 rgba(0, 0, 0, 0.4);
18-
//box-shadow: 0 1px 5px 0 rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .12);
27+
@media(max-width: $layout-xs) {
28+
transform: scale(1.05) translateX(-20px);
29+
}
1930
}
2031
}
21-
22-
@keyframes toggle-edit-on-click-ani {
23-
0% {
24-
transform: scaleY(0.5);
25-
}
26-
100% {
27-
transform: scaleY(1);
28-
}
29-
}

0 commit comments

Comments
 (0)