hubl/src/styles/base/menu-left.scss

181 lines
4.0 KiB
SCSS
Raw Normal View History

2019-05-14 15:32:42 +00:00
#main__menu {
2020-11-17 18:00:35 +00:00
width: 256px;
2020-10-13 19:13:47 +00:00
2020-10-12 19:44:06 +00:00
&.open {
transform: translateX(0);
}
2020-10-13 19:13:47 +00:00
2020-10-12 19:44:06 +00:00
.unread {
font-weight: bolder;
}
2020-10-13 19:13:47 +00:00
2020-10-12 19:44:06 +00:00
solid-router {
/* Chevron visible on large screen + rotation */
2020-10-12 19:44:06 +00:00
.menu-wrapper {
.menu-icon.icon-arrow-up {
visibility: hidden;
}
@include breakpoint(lg) {
2020-10-12 18:21:04 +00:00
.menu-icon.icon-arrow-up {
2020-10-12 19:44:06 +00:00
visibility: visible;
}
2020-10-12 19:44:06 +00:00
&.is-closed {
.sub-menu {
display: none;
2020-10-12 18:21:04 +00:00
}
2020-10-12 19:44:06 +00:00
.menu-chevron {
2020-11-17 18:00:35 +00:00
transform: rotateX(180deg);
2020-10-12 18:21:04 +00:00
}
2020-06-04 16:15:43 +00:00
}
2020-10-12 18:21:04 +00:00
}
2020-10-12 19:44:06 +00:00
}
/* end */
2020-10-13 19:13:47 +00:00
/* General styles for the main tabs */
2020-10-12 19:44:06 +00:00
.menu {
cursor: pointer;
display: flex;
2020-11-17 18:00:35 +00:00
align-items: center;
2020-10-13 19:13:47 +00:00
2020-10-12 19:44:06 +00:00
&[active] {
2020-11-17 18:00:35 +00:00
background-color: var(--color-third);
color: var(--color-heading);
2020-10-13 19:13:47 +00:00
2020-10-12 19:44:06 +00:00
.menu-icon:before {
2020-11-17 18:00:35 +00:00
background-color: var(--color-heading);
color: white;
2020-10-12 18:21:04 +00:00
}
2020-11-20 10:43:45 +00:00
&+.divider {
display: none;
2020-10-12 18:21:04 +00:00
}
2020-10-12 19:44:06 +00:00
}
.menu-icon {
2020-11-17 18:00:35 +00:00
&::before {
2020-10-12 19:44:06 +00:00
border-radius: 100%;
height: 1.9em;
line-height: 1.9em;
width: 1.9em;
2020-10-12 18:21:04 +00:00
}
}
2020-10-12 19:44:06 +00:00
}
/* End */
2020-10-13 19:13:47 +00:00
/* Styles for the submenus */
.sub-menu {
2020-10-13 19:13:47 +00:00
.project-tab,
.circle-tab,
.message-tab {
2020-10-13 19:13:47 +00:00
/* Spaces and cursor */
2020-11-23 17:50:59 +00:00
/* For project and circle */
hubl-menu-fix-url-project>solid-link>solid-display>div,
hubl-menu-fix-url-circle>solid-link>solid-display>div,
2020-11-23 17:50:59 +00:00
solid-form + div>solid-display>div {
display: flex;
justify-content: space-between;
padding: 6px 10px 6px 23px;
cursor: pointer;
}
2020-10-13 19:13:47 +00:00
&>div>solid-display {
display: block;
2020-10-13 19:13:47 +00:00
&:last-child>div {
margin-bottom: 2.2rem;
2020-10-12 18:21:04 +00:00
}
&[fields="project(customer.name, name), badge"]>div {
padding: 0;
2020-10-12 18:21:04 +00:00
}
}
2020-10-13 19:13:47 +00:00
/* when a subtab is [active] */
solid-display[active]>div {
background-color: var(--color-third);
color: var(--color-heading);
font-weight: bold;
}
2020-11-20 15:11:44 +00:00
/* Styles for the search input */
.search-field>input {
margin-left: 30px;
margin-bottom: 10px;
width: calc(80vw - 71px);
2020-11-20 15:11:44 +00:00
display: block;
background-color: var(--color-heading);
color: white;
border: 1px solid white;
border-radius: 3px;
padding-left: 9.5px;
height: 27px;
opacity: 0.8;
@include breakpoint(lg) {
margin: auto;
margin-bottom: 10px;
width: auto;
}
2020-11-20 15:11:44 +00:00
}
/* Styles for the small icon */
.sub-menu-icon {
2020-11-23 17:50:59 +00:00
width: 20px;
text-align: center;
2020-11-20 15:11:44 +00:00
div {
font-family: simple-line-icons;
2020-11-23 17:50:59 +00:00
margin-right: 4px;
}
2020-11-20 15:11:44 +00:00
}
2020-10-13 19:13:47 +00:00
/* Styles for the name */
.sub-menu-name {
2020-10-12 19:44:06 +00:00
flex: 3;
2020-10-13 19:13:47 +00:00
2020-11-23 17:50:59 +00:00
.project-customer,
.project-name,
&>div{
display: block;
width: calc(80vw - 96px); /*96px = padding of the element + width and margin of counter */
@include breakpoint(lg) {
width: 150px;
}
}
2020-10-13 19:13:47 +00:00
2020-11-23 17:50:59 +00:00
&.ellipsis>div,
.project-customer,
.project-name>div {
2020-10-12 19:44:06 +00:00
@include breakpoint(lg) {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
2020-10-12 18:21:04 +00:00
}
}
2020-11-20 10:43:45 +00:00
/* Styles for the counter */
.sub-menu-badge div.counter:not([data-nb-unread="0"]) {
text-align: center;
2020-11-20 10:43:45 +00:00
display: block;
background-color: var(--color-third, gray);
border-radius: 50%;
font-size: 12px;
line-height: 20px;
width: 20px;
height: 20px;
padding-bottom: 0;
color: var(--color-heading);
2020-10-12 19:44:06 +00:00
}
}
}
2020-10-13 19:13:47 +00:00
2020-10-12 19:44:06 +00:00
.divider {
height: 1px;
2020-11-20 10:43:45 +00:00
background-color: #D7DBE0;
opacity: 0.2;
2020-10-12 19:44:06 +00:00
}
}
}