1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Fix node hover effect to prevent jumping position

This commit is contained in:
Nick O'Leary 2019-09-10 11:39:07 +01:00
parent db9fb8480a
commit a0b1831cdb
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 10 additions and 24 deletions

View File

@ -119,10 +119,10 @@
} }
.red-ui-palette-node { .red-ui-palette-node {
display: inline-block; // display: inline-block;
cursor: move; cursor: move;
background: $secondary-background; background: $secondary-background;
margin: 5px auto; margin: 10px auto;
height: 25px; height: 25px;
border-radius: 5px; border-radius: 5px;
border: 1px solid $node-border; border: 1px solid $node-border;
@ -131,23 +131,16 @@
width: 120px; width: 120px;
background-size: contain; background-size: contain;
position: relative; position: relative;
&:first-child { &:not(.red-ui-palette-node-config):first-child {
margin-top: 10px; margin-top: 15px;
} }
&:last-child { &:not(.red-ui-palette-node-config):last-child {
margin-bottom: 10px; margin-bottom: 15px;
} }
} }
.red-ui-palette-node:hover { .red-ui-palette-node:hover {
margin: 4px auto; border-color: transparent;
border-color: $node-selected-color; box-shadow: 0 0 0 2px $node-selected-color;
border-width: 2px;
&:first-child {
margin-top: 9px;
}
&:last-child {
margin-bottom: 9px;
}
} }
.red-ui-palette-port { .red-ui-palette-port {
position: absolute; position: absolute;

View File

@ -35,15 +35,8 @@ ul.red-ui-sidebar-node-config-list {
overflow: hidden; overflow: hidden;
&.selected { &.selected {
margin: 4px auto; border-color: transparent;
border-color: $node-selected-color; box-shadow: 0 0 0 2px $node-selected-color;
border-width: 2px;
&:first-child {
margin-top: 9px;
}
&:last-child {
margin-bottom: 9px;
}
} }
} }
.red-ui-palette-label { .red-ui-palette-label {