Skip to content

Commit df06667

Browse files
committed
Fix icon button hitboxes
1 parent 2f9f335 commit df06667

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

src/components/prompteditor/DeleteElementIcon.vue

+1-5
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,5 @@ export default defineComponent({
2121
@import "@/assets/sass/_variables.sass"
2222
2323
.icon-button
24-
width: 1.2em
25-
height: 1.2em
26-
padding: 0.02em // catch misclicks
27-
margin-left: 0.4em
28-
vertical-align: middle
24+
margin-left: 0.6em
2925
</style>

src/components/properties/ElementProperties.vue

+3
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ export default defineComponent({
254254
h3
255255
margin: 0.7em 0 0.3em
256256
257+
.icon-button
258+
margin-left: 0
259+
257260
label
258261
display: inline-block
259262
margin: 0.4em 0

src/components/ui/IconButton.vue

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
2-
<span :title="title">
3-
<component :is="icon" class="icon-button"></component>
2+
<span :title="title" class="icon-button">
3+
<component :is="icon" class="icon-button-icon"></component>
44
</span>
55
</template>
66

@@ -60,19 +60,24 @@ export default defineComponent({
6060
@import "@/assets/sass/_variables.sass"
6161
6262
.icon-button
63+
margin-left: 0.5em
64+
65+
.icon-button-icon
6366
display: inline-block
6467
color: $color-accent
6568
width: 2em
6669
height: 2em
6770
padding: 0.02em // catch misclicks
68-
margin: 0 0.2em
6971
vertical-align: bottom
7072
cursor: pointer
7173
7274
.inline
75+
7376
.icon-button
77+
margin-left: 0.2em
78+
79+
.icon-button-icon
7480
width: 1.2em
7581
height: 1.2em
76-
margin-left: 0.4em
7782
vertical-align: middle
7883
</style>

0 commit comments

Comments
 (0)