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

195 lines
3.1 KiB
SCSS
Raw Permalink Normal View History

2017-08-24 13:47:28 +02:00
.menu {
width: 100%;
padding-top: $spacer;
}
2017-08-24 15:48:46 +02:00
.menu__items {
max-width: 100%;
}
2017-08-24 13:47:28 +02:00
.menu__link {
display: inline-block;
padding: $spacer;
text-decoration: none;
font-size: $font-size-small;
2017-08-24 15:48:46 +02:00
color: $brand-04;
2017-08-24 13:47:28 +02:00
position: relative;
2017-08-24 15:48:46 +02:00
&,
&:after {
transition: .25s ease-out;
}
2017-08-24 13:47:28 +02:00
// link line
&:after {
content: '';
position: absolute;
height: 2px;
width: 30px;
2017-08-24 15:48:46 +02:00
background: $brand-04;
2017-08-24 13:47:28 +02:00
display: block;
left: 50%;
margin-left: -15px;
bottom: ($spacer / 2);
// hidden by default
transform: scale(0);
transform-origin: center;
}
&:hover,
&:focus,
&.active {
2017-08-24 15:48:46 +02:00
color: $brand-03;
2017-08-24 13:47:28 +02:00
// show link line
2017-08-24 15:48:46 +02:00
&:after {
transform: scale(1);
background: $brand-03;
}
2017-08-24 13:47:28 +02:00
}
}
.menu__link--logo {
padding-top: 0;
padding-bottom: 0;
height: 100%;
display: flex;
align-items: center;
2017-08-24 15:48:46 +02:00
transition: .25s ease-out;
2017-08-24 13:47:28 +02:00
&:after {
display: none;
}
2017-08-24 15:48:46 +02:00
.logo {
transition: .25s ease-out;
}
&:hover,
&:focus {
.logo {
fill: $brand-03;
}
}
2017-08-24 13:47:28 +02:00
}
2017-08-29 13:51:54 +02:00
.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: left;
}
}
2017-08-24 13:47:28 +02:00
.menu--main {
background: $brand-05;
.row {
display: flex;
2017-08-24 15:48:46 +02:00
flex-wrap: wrap;
justify-content: center;
@media ($screen-sm) {
justify-content: space-between;
flex-wrap: nowrap;
}
2017-08-24 13:47:28 +02:00
}
.menu__link {
&:first-child {
margin-left: -($spacer);
}
&:last-child {
margin-right: -($spacer);
}
}
2017-08-24 17:18:17 +02:00
.button {
margin-left: $spacer;
}
2017-08-29 13:51:54 +02:00
.menu-overflow {
@media ($screen-md) {
text-align: right;
}
}
2017-08-24 13:47:28 +02:00
}
.menu--footer {
padding-top: $spacer * 2;
2017-08-30 19:52:14 +02:00
.logo {
fill: $brand-05;
}
.menu__link {
color: $brand-05;
display: block;
padding-top: $spacer / 4;
padding-bottom: $spacer / 4;
&:after { display: none; }
}
.social {
display: flex;
justify-content: space-between;
margin-top: $spacer;
svg {
fill: $brand-05;
}
}
}
.menu--legal {
2017-08-24 13:47:28 +02:00
padding-bottom: $spacer * 2;
2017-08-30 19:52:14 +02:00
.menu__link {
color: $brand-05;
font-size: $font-size-mini;
padding-top: 0;
padding-bottom: 0;
}
2017-08-24 13:47:28 +02:00
}
2017-08-24 15:48:46 +02:00
2017-08-29 13:51:54 +02:00
.menu--sub {
padding: 0;
}
2017-08-24 15:48:46 +02:00
2017-08-29 13:51:54 +02:00
.menu--foundation {
margin-top: $spacer * 2;
margin-bottom: 0;
2017-08-24 15:48:46 +02:00
2017-08-29 13:51:54 +02:00
&:before {
display: none;
}
2017-08-24 15:48:46 +02:00
2017-08-29 13:51:54 +02:00
.menu__link {
&:first-child {
margin-left: -$spacer;
}
&:last-child {
margin-right: -$spacer;
}
2017-08-24 15:48:46 +02:00
}
}