tweak analysis PGN import button

This commit is contained in:
Thibault Duplessis 2019-05-01 12:35:21 +07:00
parent 2ac8058672
commit 585a313868
3 changed files with 17 additions and 20 deletions

View file

@ -5,6 +5,19 @@
.pair {
@extend %flex-center;
position: relative;
.action {
@extend %box-radius-bottom;
position: absolute;
right: 0;
top: 100%;
text-align: right;
opacity: 0;
@include transition();
}
textarea:focus ~ .action {
opacity: 1;
}
}
.name {
flex: 0 0 5ch;
@ -21,18 +34,6 @@
white-space: pre-wrap;
overflow-x: hidden;
}
.action {
opacity: 0;
text-align: right;
margin-top: -2px;
@include transition();
button {
@extend %box-radius-bottom;
}
}
&:hover .action {
opacity: 1;
}
}
}

View file

@ -32,10 +32,8 @@ $col2-panel-height: 240px;
transform: scale(0);
}
&.active,
&:hover {
&::after {
transform: scale(1);
}
&:hover::after {
transform: scale(1);
}
&.active {
color: $c-accent;

View file

@ -117,10 +117,8 @@ function inputs(ctrl: AnalyseCtrl): VNode | undefined {
(vnode.elm as HTMLInputElement).value = pgnExport.renderFullTxt(ctrl);
}
}
})
]),
h('div.action', [
h('button.button.button-thin.text', {
}),
h('button.button.button-thin.action.text', {
attrs: dataIcon('G'),
hook: bind('click', _ => {
const pgn = $('.copyables .pgn textarea').val();