libreoffice-online/browser/css/menubar.css
andreas kainz 931ddfefe3 Menubar: use vars for the menubar
hover use --darker colors
disabled use --lighter colors
default use main colors
hover effect for better hightlighting

Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: Ibc37e6ecd87962ab4981b669006088a87ccf0468
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
2022-02-11 20:25:55 +01:00

444 lines
9.7 KiB
CSS

#main-menu {
top: 0;
height: auto;
z-index: 1000;
outline: none;
float: left;
background-color: transparent;
margin-left: 5px;
white-space: nowrap;
display: inline;
}
#main-menu.readonly {
top: 0px;
}
#document-header {
position: relative;
background: transparent;
margin-inline-end: 5px;
}
/*avoid multiple document-headers in readonly mode*/
.main-nav.hasnotebookbar.readonly > #main-menu #document-header {
display: none;
}
.document-logo {
position: relative;
width: 30px;
height: 30px;
}
.document-title {
height: 32px;
white-space: nowrap;
display: flex;
align-items: center;
justify-content: flex-start;
}
.readonly .document-title {
justify-content: flex-end;
}
#document-titlebar {
display: inline-table; /*new*/
table-layout: fixed;
border-spacing: 5px 0;
max-height: 39px;
flex-grow: 1;
}
.readonly #document-titlebar {
float: right;
margin-right: 52px;
}
.main-nav.hasnotebookbar:not(.readonly) #document-titlebar {
/* half of #document-name-input height: */
top: -9px;
}
.main-nav.readonly #table-optionstoolboxdown {
display: none;
}
.main-nav {
height: 38px; /* on mouseover menubar items, border emerges */
width: auto;
background: #ffffff;
padding: 3px 3px 3px 0;
white-space: nowrap;
z-index: 12;
display: flex;
align-items: center;
}
.main-nav.readonly {
position: relative;
border-bottom: 1px solid var(--gray-light-bg-color);
}
.main-nav.hasnotebookbar {
height: 32px;
/* overflow is set dynamically */
scrollbar-width: none;
-ms-scrollbar: none;
}
.main-nav.hasnotebookbar::-webkit-scrollbar {
height: 0;
}
.main-nav.hasnotebookbar:not(.readonly) {
background: var(--gray-light-bg-color);
padding: 0px;
}
/* Customizations to sm-simple theme to make it look like LO menu, lo-menu class */
.lo-menu {
border: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
background: var(--color-main-background);
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Chrome/Safari/Opera */
-khtml-user-select: none; /* Konqueror */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none;
cursor: default;
}
.lo-menu a, .lo-menu a:hover, .lo-menu a:focus, .lo-menu a:active {
font-family: var(--cool-font);
font-size: 12px;
line-height: 15px;
}
.lo-menu ul a, .lo-menu ul a:hover, .lo-menu ul a:focus, .lo-menu ul a:active {
font-size: 12px;
}
.lo-menu a.disabled {
cursor: default;
}
.lo-menu > li > a, .lo-menu > li > a.has-submenu {
padding: 8px;
z-index: 400;
border: 1px solid transparent;
}
.lo-menu a, .lo-menu a:hover, .lo-menu a:focus, .lo-menu a:active, .lo-menu a.highlighted {
padding: 5px 22px;
color: var(--color-main-text);
}
.lo-menu a:hover, .lo-menu a:focus, .lo-menu a:active, .lo-menu a.highlighted {
background: var(--color-background-darker);
color: var(--color-text-darker);
}
.lo-menu > li, .lo-menu > li > .disabled {
background: transparent; /* top-level menus remain greyish */
border-left-color: transparent;
}
.lo-menu > li .disabled {
color: var(--color-text-lighter);
}
.lo-menu > li .disabled:hover {
color: var(--color-main-text);
background-color: var(--color-background-lighter);
}
.lo-menu > li > a:hover, .lo-menu > li > a:focus, .lo-menu > li > a:active, .lo-menu > li > a.highlighted {
background: var(--color-background-darker);
color: var(--color-text-darker);
border-color: var(--color-border-darker);
border-bottom: 1px solid var(--color-border-darker);
}
.lo-menu > li > a.highlighted {
border-bottom-color: #fff;
}
.lo-menu > li > ul {
margin-top: -1px !important;
z-index: 400;
}
.lo-menu > li > a span.sub-arrow {
display: none;
}
.lo-menu ul {
border: 1px solid var(--color-border);
background: var(--color-main-background);
}
.lo-menu ul a span.sub-arrow {
right: 0;
margin-right: 5px;
background: transparent url('images/lc_menu_chevron.svg') no-repeat center right; /* we want them to be transparent always whether mobile or desktop */
color: transparent;
/*transform: rotate(180deg);*/
}
.lo-menu ul a:hover > span.sub-arrow {
-webkit-filter: brightness(100);
filter: brightness(100);
}
.lo-menu ul > li {
border-left: 0;
border-top: none;
}
.lo-menu a.separator {
height: 1px;
margin: 4px 0;
overflow: hidden;
padding-top: 0;
padding-bottom: 0;
background-color: var(--color-border-lighter);
}
/* lo-menu customizations end */
.main-nav:after {
clear: both;
content: '\00a0';
display: block;
height: 0;
font: 0px/0 serif;
overflow: hidden;
}
/* Hamburger button */
.main-menu-btn {
margin: 2px 10px;
position: relative;
display: none;
width: 17px;
height: 21px;
text-indent: 17px;
white-space: nowrap;
overflow: hidden;
cursor: pointer;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
/* Hamburger icon */
.main-menu-btn-icon,
.main-menu-btn-icon:before,
.main-menu-btn-icon:after {
position: absolute;
top: 50%;
left: 1px;
height: 2px;
width: 17px;
background: #555;
-webkit-transition: all 0.25s;
transition: all 0.25s;
}
.main-menu-btn-icon:before {
content: '';
top: -7px;
left: 0;
}
.main-menu-btn-icon:after {
content: '';
top: 7px;
left: 0;
}
/* hide menu state checkbox (keep it visible to screen readers) */
#main-menu-state {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
border: 0;
padding: 0;
overflow: hidden;
clip: rect(1px, 1px, 1px, 1px);
}
/* always show the menu in desktop view */
#main-menu-state:not(:checked) ~ #main-menu {
display: block;
}
#main-menu-state:checked ~ #main-menu {
display: block;
}
/* Some more lo-menu specific customizations */
/* The smartmenus plugin doesn't seem to have support for icons, so implement our own pseudo-elements */
.lo-menu-item-checked::before {
position: absolute;
content: ' ';
left: 2px;
background: url('images/lc_listitem-selected.svg') no-repeat left -2px;
width: 20px;
height: 20px;
}
.lo-menu-item-checked:hover::before {
color: #fff;
-webkit-filter: brightness(100);
filter: brightness(100);
}
.writer-icon-img {
background-image: url('images/x-office-document.svg');
background-size: 30px 30px;
background-repeat: no-repeat;
background-position: bottom;
}
.calc-icon-img {
background-image: url('images/x-office-spreadsheet.svg');
background-size: 30px 30px;
background-repeat: no-repeat;
background-position: bottom;
}
.impress-icon-img {
background-image: url('images/x-office-presentation.svg');
background-size: 30px 30px;
background-repeat: no-repeat;
background-position: bottom;
}
.draw-icon-img {
background-image: url('images/x-office-drawing.svg');
background-size: 30px 30px;
background-repeat: no-repeat;
background-position: bottom;
}
#menu-last-mod a {
color: var(--color-text-lighter);
padding: 8px 15px 7px;
z-index: 400;
border: 1px solid transparent;
}
#menu-last-mod a:hover {
color: var(--color-text-accent);
}
/* For classic mode */
#main-menu .locking-disabled, #menu-nb-hamburger .locking-disabled {
color: var(--gray-light-txt--color) !important;
background-color: #fafafa;
box-shadow: inset 0 0 2px 0 rgba(0,0,0,0.2);
background: url('images/lc_lock.svg') right top / 24px no-repeat
}
#main-menu .locking-disabled {
background-size: 19px;
background-position-y: 3px;
}
#main-menu .locking-disabled:hover, #menu-nb-hamburger .locking-disabled:hover {
background-color: #fafafa;
background-position: right bottom !important;
}
#main-menu .locking-disabled:hover {
background-position-y: -17px !important;
}
/* For notebook bar mode and sidebar*/
.locking-disabled:not(.mobile-wizard) img.unobutton, #toolbar-up .locking-disabled .w2ui-tb-image.w2ui-icon {
background: url('images/lc_lock.svg') center top / 24px no-repeat !important;
width: 24px !important;
padding-left: 24px;
box-sizing: border-box;
}
.locking-disabled:hover img.unobutton, #toolbar-up .locking-disabled .w2ui-tb-image.w2ui-icon:hover {
background-position: bottom !important;
}
.locking-disabled > .notebookbar.has-label img.unobutton {
background-size: 32px;
padding-left: 32px;
}
/* For mobile mode */
#mobile-wizard .locking-overlay {
position: relative;
width: 20px;
height: 20px;
right: 0px;
bottom: 0px;
z-index: 2;
border-radius: 4px;
text-align: right;
margin-right: 4%;
overflow: hidden;
}
#mobile-wizard:not(.menuwizard) .locking-overlay {
top: -38px;
background: white;
left: -8px;
box-shadow: 0 0 1px 2px #00000025;
}
#mobile-wizard:not(.menuwizard) button ~ .locking-overlay {
/* targetting primary buttons on mobile e.g.: master slide*/
margin: auto;
padding-right: 77%;
background-color: transparent;
box-shadow: none;
filter: brightness(4);
}
#mobile-wizard:not(.menuwizard) .locking-overlay-lock {
filter: brightness(0.8) contrast(1.8);
}
#mobile-wizard.menuwizard .locking-overlay-lock {
width: 20px;
filter: brightness(0.8) contrast(1.8);
-webkit-animation-iteration-count: 1;
animation-iteration-count: 1;
animation-direction: normal;
-webkit-animation-play-state: running; /* Safari 4.0 - 8.0 */
animation-play-state: running;
-webkit-animation-name: up-n-down-anim;
animation-name: up-n-down-anim;
-webkit-animation-duration: 2s;
animation-duration: 2s;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
}
@keyframes up-n-down-anim{
0%{margin-top: 0;}
50%{margin-top: -20px;}
100%{margin-top: 0;}
}
@-webkit-keyframes up-n-down-anim{
0%{margin-top: 0;}
50%{margin-top: -20px;}
100%{margin-top: 0;}
}
.sidebar .locking-overlay {
height: 22px;
overflow: hidden;
float: left;
position: relative;
right: -7px;
box-shadow: 0 0 1px 1px #0003;
border-radius: 12px;
}
.sidebar .locking-overlay-lock {
width: 20px;
background-color: white;
padding: 1px;
}
.sidebar .locking-disabled:hover .locking-overlay-lock {
margin-top: -20px;
}
.sidebar .locking-disabled button:hover ~ .locking-overlay {
box-shadow: 0 0 4px 0 #0b87e7;
}
.restricted-item {
display: none !important;
}