Caret/css/menus.less

82 lines
1.4 KiB
Text

/* Like dialogs, menus always are black-on-white */
.toolbar {
padding: 0;
margin: 0;
color: @foreground;
line-height: 30px;
list-style-type: none;
z-index: 99;
hr {
border: none;
border-top: 1px solid rgba(128, 128, 128, .2);
margin: 4px 8px;
}
.shortcut {
color: #444;
margin-left: 1em;
}
//nested menus (default)
li {
transition: opacity .2s;
display: flex;
padding: 4px 8px;
justify-content: space-between;
position: relative;
&:hover:not(.top), &.active {
color: black;
background: #EEE;
}
&.parent:hover, &.active {
& > .menu {
display: block;
}
}
.menu {
display: none;
min-width: 250px;
position: absolute;
margin-left: 90%;
margin-top: -2em;
z-index: 999;
color: black;
background: white;
padding: 4px 0;
line-height: 1.4;
white-space: nowrap;
box-shadow: 0px 8px 16px rgba(0, 0, 0, .2);
// border-left: 2px solid @accent;
}
&.parent::after {
content: "...";
font-weight: bold;
position: absolute;
right: 4px;
top: 0;
color: #444;
}
}
//base-level menus
& > li {
display: inline-block;
padding: 4px 8px;
line-height: initial;
& > .menu {
margin-left: -8px;
margin-top: 4px;
}
}
}