overleaf/services/web/frontend/stylesheets/app/editor/compile-button.less
Domagoj Kriskovic 17452b51d7 [cm6] Add toolbar to Source Mode for Beta users (#13429)
* [cm6] toolbar for source mode

* top:0 for new toolbar

* empty div for extensions

* fix legacy css top pos

* show source toolbar split test

* prettier

* show beta icon in source editor

* dropdown toolbar wip

* fix wrong conflict resolve

* math dropdown, chrome extension fixes

* math dropdown cleanup

* sort en.json

* fix sort en.json

* using isVisual

* getMeta in component, pug update

* using flex grow

* toolbar beta badge

* remove extra whitespace

* has-legacy-toolbar class

* Increase container size

* fix tests

* prettier

* styling fixes, using SplitTestBadge

* only show source toolbar if flag is set

* fix typo

---------

Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
GitOrigin-RevId: 34b01a9421f4a0d6defc40925c5092901575946e
2023-07-17 10:46:26 +00:00

105 lines
2 KiB
Text

@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;
}
// only apply for legacy editor
.toolbar-pdf-right {
.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;
}