1
0
mirror of https://github.com/ipdb/website.git synced 2024-11-12 00:04:48 +01:00
website/_src/_assets/scss/_menus.scss

133 lines
2.2 KiB
SCSS

.menu {
width: 100%;
padding-top: $spacer;
}
.menu__items {
max-width: 100%;
}
.menu__link {
display: inline-block;
padding: $spacer;
text-decoration: none;
font-size: $font-size-small;
color: $brand-04;
position: relative;
&,
&:after {
transition: .25s ease-out;
}
// link line
&:after {
content: '';
position: absolute;
height: 2px;
width: 30px;
background: $brand-04;
display: block;
left: 50%;
margin-left: -15px;
bottom: ($spacer / 2);
// hidden by default
transform: scale(0);
transform-origin: center;
}
&:hover,
&:focus,
&.active {
color: $brand-03;
// show link line
&:after {
transform: scale(1);
background: $brand-03;
}
}
}
.menu__link--logo {
padding-top: 0;
padding-bottom: 0;
height: 100%;
display: flex;
align-items: center;
transition: .25s ease-out;
&:after {
display: none;
}
.logo {
transition: .25s ease-out;
}
&:hover,
&:focus {
.logo {
fill: $brand-03;
}
}
}
.menu--main {
background: $brand-05;
.row {
display: flex;
flex-wrap: wrap;
justify-content: center;
@media ($screen-sm) {
justify-content: space-between;
flex-wrap: nowrap;
}
}
.menu__link {
&:first-child {
margin-left: -($spacer);
}
&:last-child {
margin-right: -($spacer);
}
}
.button {
margin-left: $spacer;
}
}
.menu--footer {
padding-top: $spacer * 2;
padding-bottom: $spacer * 2;
}
.menu-overflow {
// yummy scrolling
white-space: nowrap;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
margin-left: -$spacer;
margin-right: -$spacer;
padding-left: $spacer;
padding-right: $spacer;
text-align: center;
&::-webkit-scrollbar { display: none; }
@media ($screen-md) {
margin: 0;
padding: 0;
white-space: normal;
overflow: visible;
text-align: right;
}
}