libreoffice-online/browser/css/notebookbar.css
Pedro Pinto Silva eb7156061e Nb: shortcuts: increase savemodified contrast n simplify CSS
The status for unsaved documents was lacking contrast and was solely
relying on color which can be a problem for some people (deuteranopia).

Improve this by:
- Increasing color contrast
- Adjusting hue rotation and make sure it only affects img elements
- Adding visual element (red dot) as an extra visual difference between
	saved/unsaved status
	- Use shadow to increase legibility between one and the other
- Instead of adding .savemodified class to img add it to its parent
	(#save.unotoolbutton)
	- So we can style more stuff (including the new ::after element)
	without extra work
	- So we can simplify all the rules for the 3 apps (unsaved status) to
	one simple one
		- Bonus: we are then sure everything is consistent on that front

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I557a8cd9a5207d44ed3d380f96644f4ec1e99f6f
2021-11-15 19:46:11 +01:00

654 lines
15 KiB
CSS

/* tabs */
.notebookbar-tabs-container {
display: inline-flex;
}
.ui-tabs.notebookbar {
display: inline-block;
z-index: 999;
padding: 0px;
height: 100%;
}
.ui-tab.notebookbar {
float: left;
font-size: 12pt;
font-family: var(--cool-font);
line-height: normal;
color: dimgray;
color: var(--gray-light-txt--color);
height: 32px;
display: flex;
align-items: center;
padding: 0px 1em;
}
.ui-tab.notebookbar[style*='block'] {
display: inline-flex !important;
}
.ui-tab.hidden.notebookbar {
display: none;
}
.ui-tab.selected.notebookbar {
border: 0px;
border-radius: 0px;
background: var(--white-bg-color);
}
.main-nav.hasnotebookbar .ui-tab.selected.notebookbar {
text-shadow: 0px 0px 1px #0004;
}
.main-nav.hasnotebookbar.text-color-indicator .ui-tab.selected.notebookbar{
color: rgb(3, 105, 163);
color: rgb(var(--blue1-txt-primary-color));
box-shadow: -1px -1px 1px rgba(var(--blue1-txt-primary-color),0.3), 1px -1px 1px rgba(var(--blue1-txt-primary-color),0.3);
}
.main-nav.hasnotebookbar.spreadsheet-color-indicator .ui-tab.selected.notebookbar{
color: rgb(16, 104, 2);
color: rgb(var(--green0-txt-primary-color));
box-shadow: -1px -1px 1px rgba(var(--green0-txt-primary-color),0.3), 1px -1px 1px rgba(var(--green0-txt-primary-color),0.3);
}
.main-nav.hasnotebookbar.presentation-color-indicator .ui-tab.selected.notebookbar{
color: rgb(163, 62, 3);
color: rgb(var(--orange1-txt-primary-color));
box-shadow: -1px -1px 1px rgba(var(--orange1-txt-primary-color),0.3), 1px -1px 1px rgba(var(--orange1-txt-primary-color),0.3);
}
.main-nav.hasnotebookbar.drawing-color-indicator .ui-tab.selected.notebookbar{
color: rgb(135, 105, 0);
color: rgb(var(--yellow0-txt-primary-color));
box-shadow: -1px -1px 1px rgba(var(--yellow0-txt-primary-color),0.3), 1px -1px 1px rgba(var(--yellow0-txt-primary-color),0.3);
}
.main-nav.hasnotebookbar.text-color-indicator .ui-tab.notebookbar:hover {
color: rgb(var(--blue1-txt-primary-color));
box-shadow: 0 2px rgb(var(--blue1-txt-primary-color));
}
.main-nav.hasnotebookbar.spreadsheet-color-indicator .ui-tab.notebookbar:hover {
color: rgb(var(--green0-txt-primary-color));
box-shadow: 0 2px rgb(var(--green0-txt-primary-color));
}
.main-nav.hasnotebookbar.presentation-color-indicator .ui-tab.notebookbar:hover {
color: rgb(var(--orange1-txt-primary-color));
box-shadow: 0 2px rgb(var(--orange1-txt-primary-color));
}
.main-nav.hasnotebookbar.drawing-color-indicator .ui-tab.notebookbar:hover {
color: rgb(var(--yellow0-txt-primary-color));
box-shadow: 0 2px rgb(var(--yellow0-txt-primary-color));
}
.ui-tab.notebookbar:hover {
cursor: pointer;
}
/* Document Logo */
.main-nav.hasnotebookbar #document-header {
float: left;
height: 100%;
background: transparent !important;
align-items: center;
display: flex;
}
/* grid */
.notebookbar.ui-grid {
border-spacing: 0px;
}
/* shortcuts bar */
.notebookbar-shortcuts-bar {
display: inline-block;
position: relative;
z-index: 1000;
height: 100%;
box-sizing: border-box;
}
.notebookbar-shortcuts-bar > table {
display: block;
height: 31px;
}
.notebookbar-shortcuts-bar .unotoolbutton.notebookbar .unobutton {
width: 16px !important;
height: 16px !important;
margin: 0 !important;
}
.notebookbar-shortcuts-bar .notebookbar.unotoolbutton {
height: 27px;
width: 24px;
display: flex;
margin: 0px !important;
align-items: center;
justify-content: center;
flex-direction: column;
}
#Save.savemodified:after {
content: '';
display: block;
width: 4px;
height: 4px;
border-radius: 2px;
filter: none !important;
background: #f12131;
box-shadow: 0 0 2px 2px #efefef;
position: absolute;
top: 8px;
margin-left: 11px;
}
.hasnotebookbar.spreadsheet-color-indicator #table-shortcutstoolbox .unotoolbutton:not(.integrator-shortcut) img {
-webkit-filter: hue-rotate(290deg);
filter: hue-rotate(290deg);
}
.hasnotebookbar.presentation-color-indicator #table-shortcutstoolbox .unotoolbutton:not(.integrator-shortcut) img {
-webkit-filter: hue-rotate(190deg);
filter: hue-rotate(190deg);
}
.hasnotebookbar.drawing-color-indicator #table-shortcutstoolbox .unotoolbutton:not(.integrator-shortcut) img {
-webkit-filter: hue-rotate(210deg);
filter: hue-rotate(210deg);
}
.hasnotebookbar #table-shortcutstoolbox .unotoolbutton.savemodified:not(.integrator-shortcut) img {
filter: hue-rotate(508deg) contrast(1.5);
}
/* Hamburger icon: from shortcutsbar (notebookbar) */
.hasnotebookbar.text-color-indicator #shortcuts-menubar-icon {
background: rgb(3, 105, 163);
background: rgb(var(--blue1-txt-primary-color));
}
.hasnotebookbar.spreadsheet-color-indicator #shortcuts-menubar-iconr {
background: rgb(16, 104, 2);
background: rgb(var(--green0-txt-primary-color));
}
.hasnotebookbar.presentation-color-indicator #shortcuts-menubar-icon {
background: rgb(163, 62, 3);
background: rgb(var(--orange1-txt-primary-color));
}
.hasnotebookbar.drawing-color-indicator #shortcuts-menubar-icon {
background: rgb(135, 105, 0);
background: rgb(var(--yellow0-txt-primary-color));
}
.hasnotebookbar .notebookbar-shortcuts-bar #Menubar,
.hasnotebookbar .notebookbar-shortcuts-bar #Menubar li,
.hasnotebookbar .notebookbar-shortcuts-bar #Menubar > li > a {
background-color: transparent;
margin: 0px !important;
}
.hasnotebookbar .notebookbar-shortcuts-bar #Menubar > li > a {
cursor: pointer;
border: none;
padding: 4px;
}
.hasnotebookbar #shortcuts-menubar-icon {
position: absolute;
top: 45%;
left: 6px;
height: 2px;
width: 16px;
-webkit-transition: all 0.25s;
transition: all 0.25s;
}
/* options section */
.notebookbar-options-section {
display: inline;
position: fixed;
height: 32px;
right: 0px;
z-index: 1000;
}
/* root container */
.notebookbar-scroll-wrapper {
overflow-x: scroll;
overflow-y: hidden;
scrollbar-width: none; /* Firefox >= 64 */
overflow: -moz-scrollbars-none; /* Firefox < 64 */
-ms-overflow-style: none; /* Internet Explorer 10+ */
display: flex;
height: 72px;
align-items: center;
}
.root-container.notebookbar {
display: table-cell;
vertical-align: middle;
}
.notebookbar-scroll-wrapper::-webkit-scrollbar { /* WebKit */
width: 0;
height: 0;
}
#toolbar-wrapper.hasnotebookbar {
background: var(--white-bg-color);
position: relative;
z-index: 11;
background-color: white;
}
.cell.notebookbar {
display: table-cell;
vertical-align: middle;
padding: 2px;
}
.row.notebookbar {
display: table-row;
}
.vertical.notebookbar {
width: max-content;
}
/* unobuttons */
.hasnotebookbar .ui-content .unobutton {
width: 32px;
height: 32px;
margin-right: 5px;
vertical-align: middle;
}
.hasnotebookbar .ui-content.unotoolbutton.selected.has-label,
.hasnotebookbar .ui-content.unotoolbutton.selected.inline,
.hasnotebookbar .ui-content.unotoolbutton.selected:not(.has-label):not(.inline) {
background-color: var(--gray-light-bg-color);
outline: 2px solid var(--gray-light-bg-color);
color: var(--gray-light-txt--color);
}
.hasnotebookbar .ui-content.unotoolbutton.selected:hover,
.unotoolbutton.notebookbar:hover,
.hasnotebookbar .ui-content.unotoolbutton.selected:not(.has-label):not(.inline):hover {
box-shadow: 0 0 0 1px var(--gray-color);
}
/* avoid bug with arrow in new line when window is small */
#table-Home-Section-Insert #table-LineB9 #InsertGraphic.notebookbar,
#table-Home-Section-Insert #table-GroupB20 #InsertTable.notebookbar {
width: 50px;
}
#table-Home-Section-Insert #table-LineB9 #InsertGraphic.notebookbar{
width: auto;
margin-left: -2px;
}
#buttonbefore.notebookbar, #buttonafter.notebookbar, #buttonoptimal.notebookbar, #buttonparallel.notebookbar, #buttonnone.notebookbar, #buttonthrough.notebookbar, #bottom.notebookbar, #top.notebookbar, #standard.notebookbar, #Bold.notebookbar, #Italic.notebookbar, #Underline.notebookbar, #Strikeout.notebookbar{
margin: 0px !important;
padding: 0px !important;
}
.unotoolbutton.notebookbar .unobutton {
width: 24px !important;
height: 24px !important;
margin-right: 0px !important;
}
.has-dropdown--color.notebookbar {
height: 24px !important;
}
.unotoolbutton.notebookbar .unolabel {
font-family: var(--cool-font);
color: var(--gray-light-txt--color);
padding: 0px 5px !important;
}
/*Adjust arrow for statistics menu (has icon, label stacked up)*/
.unospan-Data-StatisticsMenu .unoarrow {
display: block;
float: right;
margin-top: -28px;
}
.unotoolbutton.notebookbar:hover .unoarrow {
border-top: 5px solid var(--gray-light-txt--color);
}
#table-HomeTab .unospan-uptoolbar:not(.disabled) {
border-top-left-radius: 12px;
border-bottom-left-radius: 12px;
background: linear-gradient(to left, #e6e6e600, #e6e6e652 30%);
}
#table-HomeTab .unospan-downtoolbar:not(.disabled) {
background: linear-gradient(to right, #e6e6e600, #e6e6e652 30%);
border-top-right-radius: 12px;
border-bottom-right-radius: 12px;
}
#table-HomeTab .unospan-uptoolbar:not(.disabled):hover{
box-shadow: -2px 0 2px 2px #e6e6e6b0;
}
#table-HomeTab .unospan-downtoolbar:not(.disabled):hover{
box-shadow: 2px 0 2px 2px #e6e6e6b0;
}
#table-HomeTab .unospan-uptoolbar img, #table-HomeTab .unospan-downtoolbar img {
width: 18px !important;
height: 18px !important;
padding: 4px;
}
.unotoolbutton.notebookbar .unobutton.selected + .ui-content.unolabel {
color: rgb(3, 105, 163) !important;
color: var(--blue1-txt-primary-color) !important;
}
.unotoolbutton.notebookbar.disabled:not(.unospan-shortcutstoolbox),
.mobile-wizard-widebutton.disabled,
.freemium-disabled {
opacity: 0.65;
}
.freemium-disabled:hover {
opacity: 1;
}
.restricted-item {
display: none !important;
}
.unotoolbutton.notebookbar.disabled img, .mobile-wizard-widebutton.disabled img {
-webkit-filter: grayscale(100%) brightness(100%);
filter: grayscale(100%) brightness(100%);
}
.unotoolbutton.notebookbar {
margin-right: 5px !important;
text-align: center;
}
.unotoolbutton.notebookbar.has-label > *{ /*so they stay side by side*/
display: table-cell;
}
.unotoolbutton.notebookbar.has-label {
text-align: center;
}
.unotoolbutton.notebookbar.has-label:not(.inline) img {
width: 24px !important;
margin: auto !important;
}
/* unobuttons with inline labels */
.inline.notebookbar {
float: left;
width: max-content;
white-space: nowrap;
display: inline-table;
}
#FormatPaintbrush span
{
display: none;
}
/* comboboxes in readonly mode on mobile devices */
.notebookbar-scroll-wrapper .select2-container {
z-index: auto !important;
}
/* Writer */
/* File Tab */
/* Home tab */
#table-HomeTab {
margin-left: -16px;/*force alignment: clipboard elements*/
margin-top: -5px;
}
#clearFormatting.notebookbar div img, #FormatPaintbrush.notebookbar div img {
width: 24px !important;
height: 24px !important;
}
#clearFormatting.notebookbar, #FormatPaintbrush.notebookbar{
height: 24px !important;
}
#fontsize.notebookbar .select2.select2-container {
width: 60px !important;
}
#fontnamecombobox.notebookbar .select2 {
width: 170px !important;
top: -1px;
}
#fontnamecombobox.notebookbar {
padding-right: 0px;
}
#BackColor.notebookbar, #CharBackColor.notebookbar { /* remove when #2149 is fixed*/
margin-left: 44px !important;
}
#BackgroundColor.notebookbar {
margin-left: 0px !important;
}
#fontsizecombobox.notebookbar .select2 {
width: 50px !important;
}
#applystyle.notebookbar .select2 {
width: 170px !important;
}
.notebookbar.ui-combobox > .select2 * {
line-height: 22px;
}
.notebookbar.ui-combobox > .select2 .select2-selection__arrow {
height: 22px;
}
/* Styles preview */
#stylesview {
height: 60px;
width: 530px;
overflow-x: hidden;
padding: 5px;
padding: 0px;
border: 1px solid var(--gray-color);
border-collapse: separate; /*To use box-shadow in Internet Explorer 9 or later*/
-webkit-box-shadow: 0 0 3px var(--gray-color);
box-shadow: inset 0 0 3px var(--gray-color);
}
#stylesview .ui-iconview-entry {
width: 30%;
height: 60px;
padding: 2px;
box-sizing: border-box;
border-radius: 0;
}
#stylesview .ui-iconview-entry.selected {
border: 1px solid var(--gray-light-txt--color);
border-collapse: separate; /*To use box-shadow in Internet Explorer 9 or later*/
-webkit-box-shadow: 0 0 2px var(--gray-light-txt--color);
box-shadow: 0 0 2px var(--gray-light-txt--color);
}
#stylesview .ui-iconview-icon img {
height: 30px;
}
#stylesview .ui-iconview-icon img:after {
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 30px;
background-color: var(--white-bg-color);
overflow: hidden;
white-space: nowrap;
text-align: center;
content: attr(alt);
}
#stylesview .ui-iconview-entry:not(.selected) {
border: 1px solid transparent;
}
#stylesview .ui-iconview-entry:hover {
border: 1px solid var(--gray-color);
border-collapse: separate; /*To use box-shadow in Internet Explorer 9 or later*/
-webkit-box-shadow: 0 0 3px 1px #8080804f, inset -0.5px -0.5px 0 0.5px #ccc, inset 0.5px 0.5px 0 0.5px #ccc;
box-shadow: 0 0 3px 1px #8080804f, inset -0.5px -0.5px 0 0.5px #ccc, inset 0.5px 0.5px 0 0.5px #ccc;
cursor: pointer;
}
#stylesview .ui-iconview-icon {
height: 35px;
}
#stylesview .ui-iconview-text {
font-size: 10pt;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
/* Insert Tab */
/* Layout Tab */
/* References Tab */
/* Format Tab */
/* Table Tab */
/* Review Tab */
/* Help tab */
/* File tab */
/* Draw tab */
/* Calc */
/* Home tab */
#numbertype .select2.select2-container {
width: 170px !important;
}
/* Review Tab */
/* Sheet Tab */
/* Data Tab */
/* Impress */
/* Home Tab */
/* Insert Tab */
#table-Insert #HeaderAndFooter.notebookbar {
min-width: 160px;
}
/* Review Tab */
/* Table Tab */
/* Draw Tab */
/* other */
.ui-drawing-area-container
{
position: relative;
}
.ui-drawing-area-loader
{
border: 5px solid #f3f3f3;
border-top: 5px solid #d6d6d6;
border-radius: 50%;
width: 20px;
height: 20px;
animation: spin 2s linear infinite;
margin-left: auto;
margin-right: auto;
position: relative;
top: 25%;
}
.ui-drawing-area-loader-container
{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.ui-drawing-area-placeholder-container
{
position: absolute;
overflow: hidden;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.ui-drawing-area-placeholder
{
margin: 0;
position: absolute;
top: 50%;
-ms-transform: translateY(-50%);
transform: translateY(-50%);
width: 100%;
text-align: center;
}
#style1 img ~ .ui-drawing-area-placeholder-container .ui-drawing-area-placeholder {
font-family: Liberation Serif;
font-size: 12pt;
}
#style2 img ~ .ui-drawing-area-placeholder-container .ui-drawing-area-placeholder {
font-family: Liberation Serif;
font-size: 12pt;
}
#style3 img ~ .ui-drawing-area-placeholder-container .ui-drawing-area-placeholder {
font-family: Liberation Sans;
font-size: 28pt;
font-weight: bold;
}
#style4 img ~ .ui-drawing-area-placeholder-container .ui-drawing-area-placeholder {
font-family: Liberation Sans;
font-size: 18pt;
}