Skip to content

Commit 38dc3f4

Browse files
ui: remove jiggle from Login page items (aws#4864)
There was previously a jiggle when moving the mouse on the items since all border sizes were not the same. Solution: Make a single css class with the base item properties so that regardless of state they all share the same border width. Then the stateful classes like hover or selected will only change what they need to change. Signed-off-by: Nikolas Komonen <[email protected]>
1 parent 2a3c1e0 commit 38dc3f4

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

packages/core/src/login/webview/vue/selectableItem.vue

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div
3-
class="item-container"
3+
class="item-container-base"
44
:class="{ selected: isSelected, hovering: isHovering }"
55
@click="toggleSelection"
66
@mouseover="isHovering = true"
@@ -95,23 +95,21 @@ export default defineComponent({
9595
</script>
9696

9797
<style scoped>
98-
.item-container {
98+
.item-container-base {
9999
padding: 5px;
100100
display: flex;
101-
}
102-
103-
.item-container {
104-
border: 1px solid #625f5f;
101+
border-width: 1px;
102+
border-style: solid;
103+
border-color: #625f5f;
104+
user-select: none;
105105
}
106106
107107
.hovering {
108-
border: 2px solid #0e639c;
109-
user-select: none;
108+
border-color: #0e639c;
110109
}
111110
112111
.selected {
113-
border: 1px solid #3675f4;
114-
user-select: none;
112+
border-color: #3675f4;
115113
}
116114
117115
.title {

0 commit comments

Comments
 (0)