components/sass/navigation/_index.scss

136 lines
2 KiB
SCSS
Raw Normal View History

2019-02-08 00:55:31 +01:00
drawer-navigation {
2019-11-22 22:04:03 +01:00
width: 100%;
height: 5rem;
2019-02-08 00:55:31 +01:00
display: inline-flex;
flex: 1;
2019-03-05 22:02:41 +01:00
font-size: inherit;
justify-content: center;
2019-02-08 00:55:31 +01:00
position: relative;
2019-02-08 21:17:21 +01:00
z-index: 10;
2019-02-08 00:55:31 +01:00
}
2019-11-22 22:04:03 +01:00
drawer-navigation-helper {
// This is to make mouse movement forgiving
width: 0;
height: 0;
top: 3rem;
left: -5rem;
2019-03-05 22:02:41 +01:00
border-right: 8rem solid transparent;
border-bottom: 5rem solid transparent;
2019-03-05 22:09:30 +01:00
border-left: 8rem solid transparent;
2019-03-05 22:02:41 +01:00
position: absolute;
}
2019-02-08 00:55:31 +01:00
drawer-section {
2019-03-05 22:02:41 +01:00
padding-right: 1rem;
padding-left: 1rem;
2019-02-08 00:55:31 +01:00
&:not(:hover):not(.active) {
2019-02-08 00:55:31 +01:00
drawer-title::after {
background-color: transparent;
}
2019-03-05 22:02:41 +01:00
drawer-navigation-helper,
2019-02-08 00:55:31 +01:00
drawer-wrap {
display: none;
}
}
&:hover,
&.active {
2019-03-05 22:02:41 +01:00
z-index: 3;
2019-02-08 00:55:31 +01:00
drawer-title::after {
2019-11-22 22:04:03 +01:00
background-color: var(--color-primary);
2019-02-08 00:55:31 +01:00
}
}
}
drawer-title {
height: 100%;
align-items: center;
cursor: default;
display: flex;
line-height: 3;
position: relative;
2019-03-05 22:02:41 +01:00
z-index: 1;
2019-02-08 00:55:31 +01:00
&::after {
2019-11-22 22:04:03 +01:00
width: 100%;
height: 1px;
bottom: -1px;
left: 0;
2019-02-08 00:55:31 +01:00
content: "";
position: absolute;
z-index: 1;
}
}
drawer-wrap {
width: 100%;
2019-11-22 22:04:03 +01:00
top: 5rem;
left: 0;
2019-02-08 00:55:31 +01:00
2019-11-22 22:04:03 +01:00
background-color: var(--color-white);
border-top: 1px solid var(--color-gray-1);
2019-02-08 00:55:31 +01:00
padding-top: 2rem;
padding-bottom: 2rem;
position: absolute;
&::after {
2019-11-22 22:04:03 +01:00
width: 100vw;
height: calc(100vh - 5rem);
top: 5rem;
left: 0;
2019-02-08 00:55:31 +01:00
2019-11-22 22:04:03 +01:00
background-color: var(--color-black);
2019-02-08 00:55:31 +01:00
content: "";
opacity: 0.3;
pointer-events: none;
position: absolute;
z-index: -1;
}
}
drawer-children {
display: flex;
flex-wrap: wrap;
position: relative;
}
drawer-child {
2019-02-08 21:17:21 +01:00
padding: var(--spacing-s);
border: 2px solid;
transition: all 0.2s;
&:not(:hover) {
border-color: transparent;
}
&:hover {
2019-11-22 22:04:03 +01:00
border-color: var(--color-gray-1);
2019-02-08 21:17:21 +01:00
padding-left: var(--spacing-m);
> a {
2019-11-22 22:04:03 +01:00
color: var(--lbry-primary);
2019-02-08 21:17:21 +01:00
}
}
&:not([full-width]) {
width: 50%;
}
&[full-width] {
width: 100%;
2019-02-08 00:55:31 +01:00
}
span {
2019-02-08 21:17:21 +01:00
display: flex;
padding-top: 0.25rem;
padding-bottom: 0.25rem;
2019-02-08 00:55:31 +01:00
}
}