mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-25 10:12:57 +00:00
b62cb86bf8
* Create a new shared `SplitMenu` component. * Refactor the pdf compile button & detached compile button: - Rename `detach-compile-button` to `detach-compile-button-wrapper` - Rename `pdf-compile-button-inner` to `detach-compile-button` - Move some of the logic from `detach-compile-button-wrapper` to `detach-compile-button` - Create a new `compile-button.less` to centralize all of the compile button (detached/non-detached) custom styles rule. - Extract the animated striped CSS definition to the dedicated CSS file, change the class from `btn-recompile-group-has-changes` to `btn-striped-animated` - Refactor other className(s) appropriately according to the new component name - Delete the unused `changes-to-autocompile` css rule since it has not been used anywhere * Implement the new pdf compile button with the new `SplitMenu` component. GitOrigin-RevId: d1d055bffd311923fc47b4681605ce8ba8e26f25
91 lines
1.9 KiB
Text
91 lines
1.9 KiB
Text
.split-menu {
|
|
display: flex;
|
|
|
|
&.btn-md,
|
|
&.btn-sm,
|
|
&.btn-xs {
|
|
padding: 0;
|
|
}
|
|
|
|
&.btn-md {
|
|
& > .split-menu-button,
|
|
& > .split-menu-dropdown-toggle {
|
|
height: 36px;
|
|
}
|
|
}
|
|
|
|
&.btn-sm {
|
|
& > .split-menu-button,
|
|
& > .split-menu-dropdown-toggle {
|
|
height: 32px;
|
|
}
|
|
}
|
|
|
|
&.btn-xs {
|
|
& > .split-menu-button,
|
|
& > .split-menu-dropdown-toggle {
|
|
height: 28px;
|
|
}
|
|
}
|
|
|
|
&.btn-primary {
|
|
background-color: @ol-green;
|
|
}
|
|
|
|
.split-menu-icon {
|
|
margin-right: @line-height-computed / 4;
|
|
}
|
|
|
|
.split-menu-button {
|
|
border-top-right-radius: 0;
|
|
border-bottom-right-radius: 0;
|
|
height: 100%;
|
|
color: @white;
|
|
padding-top: 0;
|
|
padding-bottom: 0;
|
|
|
|
&.btn-primary {
|
|
border-right: 1px solid @green-10;
|
|
}
|
|
|
|
// on new css, btn-secondary already has a border
|
|
&.btn-secondary when (@is-new-css = false) {
|
|
border-right: 1px solid @neutral-10;
|
|
}
|
|
|
|
&.btn-danger {
|
|
border-right: 1px solid @red-10;
|
|
}
|
|
|
|
&[disabled] when (@is-new-css = false) {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.split-menu-button when (@is-new-css = true) {
|
|
// workaround for for the blue 2x border on the new css
|
|
// if z-index rule is not added, the border will overlap under the `split-menu-dropdown-toggle` since margin between both component is only 1px
|
|
z-index: 1;
|
|
}
|
|
|
|
.split-menu-dropdown {
|
|
float: none;
|
|
display: flex;
|
|
flex-wrap: nowrap;
|
|
align-self: stretch;
|
|
margin-right: 6px;
|
|
|
|
.split-menu-dropdown-toggle {
|
|
border-bottom-left-radius: 0;
|
|
border-top-left-radius: 0;
|
|
padding: 0 8px;
|
|
|
|
// on new css, btn-secondary has a border
|
|
// since the border between both buttons already been defined in the `split-menu-button`
|
|
// we will remove the rule from the dropdown toggle
|
|
&.btn-secondary when (@is-new-css = true) {
|
|
border-left: none;
|
|
}
|
|
}
|
|
}
|
|
}
|