libreoffice-online/browser/css/btns.css
Szymon Kłos ec63d9c032 css: fix button-box alignment
in 24.04 more elements are grid now, it seems to be a
regression in button box:
1. enable macro execution in coolwsd.xml
2. open spreadsheet with macro
Result: you see the dialog with buttons in 2 rows
Expected: all buttons are in the same row

it seems to be missing grid placement for left and right sections

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic1a3479114e4f832e852b9bdf3d39d2669ae69bb
2024-04-29 21:54:14 +01:00

166 lines
4.7 KiB
CSS

/* For btns hover status see device-desktop.css */
.jsdialog *[disabled] {
color: var(--color-text-lighter) !important;
background: var(--color-background-lighter);
}
.jsdialog *[disabled]:not(label):not(.ui-frame-container):not(.checkbutton):not(.spinfieldcontainer):not(.ui-grid):not(.ui-content):not(.ui-listbox-container) {
border: 1px solid var(--color-border-lighter);
}
/* toolbuttons */
.unotoolbutton .unobutton img {
width: var(--btn-size);
height: var(--btn-size);
}
.unotoolbutton .unobutton.selected + .ui-content.unolabel {
color: var(--color-text-dark);
}
/* toolbuttons non selected */
#clearFormatting,
.hasnotebookbar .ui-content.unotoolbutton.has-label,
.hasnotebookbar .ui-content.unotoolbutton.inline,
.hasnotebookbar .ui-content.unotoolbutton:not(.has-label):not(.inline),
.sidebar.unotoolbutton,
.jsdialog.unotoolbutton {
background-color: transparent;
border: 1px solid transparent;
color: var(--color-main-text);
border-radius: var(--border-radius);
}
/* toolbuttons selected */
.hasnotebookbar .ui-content.unotoolbutton.selected.has-label,
.hasnotebookbar .ui-content.unotoolbutton.selected.inline,
.hasnotebookbar .ui-content.unotoolbutton.selected:not(.has-label):not(.inline),
.sidebar.unotoolbutton.selected,
.jsdialog.unotoolbutton.selected {
background-color: var(--color-background-dark);
border: 1px solid var(--color-border-dark);
color: var(--color-text-dark);
border-radius: var(--border-radius);
}
[data-theme='dark'] .hasnotebookbar .ui-content.unotoolbutton.selected.has-label,
[data-theme='dark'] #toggledarktheme,
[data-theme='dark'] .hasnotebookbar .ui-content.unotoolbutton.selected.inline,
[data-theme='dark'] .hasnotebookbar .ui-content.unotoolbutton.selected:not(.has-label):not(.inline),
[data-theme='dark'] .sidebar.unotoolbutton.selected {
background-color: var(--color-background-darker);
border-color: var(--color-border-darker);
}
/* toolbuttons selected hover */
.hasnotebookbar .ui-content.unotoolbutton.selected:hover,
.unotoolbutton.notebookbar:hover,
.unotoolbutton.jsdialog:hover,
.hasnotebookbar .ui-content.unotoolbutton.selected:not(.has-label):not(.inline):hover,
.sidebar.unotoolbutton.selected:hover,
.jsdialog.unotoolbutton.selected:hover {
background-color: var(--color-background-darker) !important;
border: 1px solid var(--color-border-darker);
color: var(--color-text-darker);
border-radius: var(--border-radius);
}
/*limit icon to button height*/
button.jsdialog img {
max-height: 100%;
}
.annotation-btns-container {
display: flex;
flex-direction: row;
justify-content: end;
flex-wrap: wrap;
}
:not(.main-nav) .button-secondary,
:not(.main-nav) > div > button:not(.ui-tab):not(.ui-corner-all):not(.button-primary):not(.unobutton):not(.form-field-button):not(.col) {
box-sizing: border-box;
height: 32px;
line-height: 0em;
color: var(--color-main-text);
font-size: var(--default-font-size);
min-width: 62px;
background-color: var(--color-background-dark);
border: 1px solid var(--color-btn-border);
border: 1px solid var(--color-border-dark);
border-radius: var(--border-radius);
margin: 5px;
vertical-align: middle;
width: max-content;
}
.button-primary {
height: 32px;
line-height: 0em;
color: var(--color-primary-text);
min-width: 62px;
background-color: var(--color-primary);
border: 1px solid var(--color-primary-dark);
border-radius: var(--border-radius);
margin: 5px;
vertical-align: middle;
width: max-content;
}
.jsdialog.ui-button-box.end {
margin-top: 8px;
display: flex;
justify-content: space-between;
}
.jsdialog.ui-button-box button[disabled='disabled'] {
color: var(--color-text-lighter) !important;
background-color: var(--color-background-lighter) !important;
border-color: var(--color-border-lighter) !important;
}
.ui-button-box .jsdialog.ui-pushbutton:not(.hidden) {
display: initial !important;
}
.ui-pushbutton[disabled] {
color: var(--color-text-lighter) !important;
background-color: var(--color-background-lighter) !important;
border: 1px solid var(--color-border-lighter) !important;
}
.ui-pushbutton[disabled]:hover {
cursor: not-allowed !important;
background: var(--color-background-darker) !important;
}
/* button box */
.jsdialog.ui-button-box {
display: grid;
}
.jsdialog.ui-button-box-right {
grid-column: 2;
display: flex;
justify-self: end;
margin-inline-end: -5px;
}
.jsdialog.ui-button-box-left {
grid-column: 1;
display: flex;
justify-self: start;
margin-inline-start: -5px;
}
/* Eg: Sidebar -> Animation -> Effects buttons shouldn't overflow the content */
button.has-img {
min-width: auto !important;
}
/* Calc Auto-Filter buttons coming from core */
[data-theme='dark'] button#select_current.has-img > img {
filter: invert(.9)
}
[data-theme='dark'] button#unselect_current.has-img > img {
filter: invert(.9)
}