overleaf/services/web/frontend/stylesheets/app/editor/compile-button.less

103 lines
1.9 KiB
Text
Raw Normal View History

@stripe-width: 20px;
@keyframes pdf-toolbar-stripes {
from {
background-position: 0 0;
}
to {
background-position: @stripe-width 0;
}
}
.detach-compile-button-container {
border-radius: @btn-border-radius-base 0 0 @btn-border-radius-base;
margin-left: 6px;
}
.detach-compile-button-container when (@is-new-css = false) {
margin-right: -5px;
}
// because 2px border on :active state
.detach-compile-button-container when (@is-new-css = true) {
margin-right: -3px;
}
.btn-striped-animated {
// prettier-ignore
#gradient > .striped(@color: rgba(255, 255, 255, 0.2), @angle: -45deg);
background-size: @stripe-width @stripe-width;
.animation(pdf-toolbar-stripes 2s linear infinite);
}
.detach-compile-button when (@is-new-css = false) {
&[disabled],
&[disabled].active,
&[disabled]:hover,
&[disabled]:focus {
background-color: mix(@btn-primary-bg, @toolbar-alt-bg-color, 65%);
.opacity(1);
}
}
.detach-compile-button {
height: 28px;
padding-top: 0;
padding-bottom: 0;
&.detach-compile-button-disabled {
&,
&:hover {
color: @white;
background-color: @ol-green;
}
}
}
.detach-compile-button when (@is-new-css = true) {
border: none;
}
.detach-compile-button-label {
margin-left: @line-height-computed / 4;
}
@keyframes compile-button-flash {
from,
to {
background: rgba(0, 0, 0, 0);
}
25%,
75% {
background: rgba(0, 0, 0, 0.2);
}
}
@keyframes compile-button-bounce {
from,
50%,
to {
transform: translateY(0);
}
25%,
75% {
transform: translateY(2px);
}
}
.detach-compile-button-animate {
animation-duration: 1.2s;
animation-fill-mode: both;
animation-timing-function: ease-in-out;
animation-name: compile-button-flash;
}
.detach-compile-button-animate .caret {
animation-duration: 0.6s;
animation-delay: 0.4s;
animation-fill-mode: both;
animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
animation-name: compile-button-bounce;
}