- md5
- 76305484556beca6c7a436ac3ddac87e
- sha1
- 359cedaae64defffdce9b4c3196a77dbf74eedb2
- sha256
- dbd53b4104b212e8d056469918299bf9ad1398e2fa510a57324740ae4abfd2e2
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
/** === Main menu === */
.main-navigation {
display: block;
margin-top: #{0.25 * $size__spacing-unit};
body.page & {
display: block;
}
> div {
display: inline;
}
.main-menu {
display: inline;
margin: 0;
padding: 0;
> li {
color: $color__link;
display: inline;
@include media(tablet) {
position: relative;
}
> a {
font-weight: 700;
color: $color__link;
margin-right: #{0.5 * $size__spacing-unit};
+ svg {
margin-right: #{0.5 * $size__spacing-unit};
}
&:hover,
&:hover + svg {
color: $color__link-hover;
}
}
&.menu-item-has-children {
display: inline-block;
> a {
margin-right: #{0.125 * $size__spacing-unit};
}
& > a,
.menu-item-has-children > a {
&:after {
content: "";
display: none;
}
}
.mobile-submenu-expand svg,
.desktop-submenu-expand svg {
position: relative;
top: 0.2rem;
}
.mobile-submenu-expand,
.desktop-submenu-expand {
margin-right: #{0.5 * $size__spacing-unit};
}
}
&:last-child > a {
margin-right: 0;
}
}
}
.sub-menu {
background: $color__link;
color: $color__background-body;
list-style: none;
padding-left: 0;
display: none;
float: left;
position: absolute;
opacity: 0;
left: -999px;
z-index: 99999;
@include media(tablet) {
width: max-content;
max-width: calc(3 * (100vw / 12));
}
> li {
clear: both;
display: block;
float: none;
position: relative;
word-break: break-word;
&.menu-item-has-children {
.mobile-submenu-expand,
.desktop-submenu-expand {
position: absolute;
width: calc( 24px + #{$size__spacing-unit} );
right: 0;
top: calc( .125 * #{$size__spacing-unit} );
bottom: 0;
color: white;
line-height: 1;
padding: calc( .5 * #{$size__spacing-unit} );
svg {
top: 0;
}
}
.mobile-submenu-expand,
.desktop-submenu-expand {
margin-right: 0;
}
@include media(tablet) {
.menu-item-has-children > a {
&:after {
content: "\203a";
}
}
}
}
> a:not(.mobile-submenu-expand) {
color: $color__background-body;
display: block;
line-height: $font__line-height-heading;
padding: calc( .5 * #{$size__spacing-unit} ) calc( 24px + #{$size__spacing-unit} ) calc( .5 * #{$size__spacing-unit} ) $size__spacing-unit;
&:hover,
&:focus {
background: $color__link-hover;
&:after {
background: $color__link-hover;
}
}
}
&.mobile-parent-nav-menu-item {
display: none;
font-size: $font__size-sm;
font-weight: normal;
svg {
position: relative;
top: 0.2rem;
margin-right: calc( .25 * #{$size__spacing-unit} );
}
}
}
}
/*
* :focus-within needs its own selector so other similar
* selectors don’t get ignored if a browser doesn’t recognize it
*/
.main-menu .menu-item-has-children:focus-within > .sub-menu {
display: block;
left: 0;
margin-top: 0;
opacity: 1;
width: calc( 100vw - #{$size__spacing-unit * 2});
.sub-menu {
margin-top: inherit;
position: relative;
padding-left: $size__spacing-unit;
@include media(tablet) {
padding-left: 0;
position: absolute;
left: 100%;
width: max-content;
top: 0;
}
}
}
.main-menu .menu-item-has-children:hover > .sub-menu,
.main-menu .menu-item-has-children:focus > .sub-menu,
.main-menu .menu-item-has-children .sub-menu:hover,
.main-menu .menu-item-has-children .sub-menu:focus {
/* Non-mobile position */
@include media(tablet) {
display: table;
margin-top: 0;
opacity: 1;
position: absolute;
left: 0;
right: auto;
top: auto;
bottom: auto;
height: auto;
width: max-content;
transform: none;
animation: fade_in 0.1s forwards;
}
.sub-menu {
@include media(tablet) {
margin-top: inherit;
padding-left: 0;
position: absolute;
left: 100%;
top: 0;
}
}
}
.main-menu .menu-item-has-children.focus .sub-menu.expanded-true {
display: table;
margin-top: 0;
opacity: 1;
padding-left: 0;
/* Mobile position */
left: 0;
top: 0;
right: 0;
bottom: 0;
position: fixed;
z-index: 100000; /* Make sure appears above mobile admin bar */
width: 100%;
height: 100%;
transform: translateX(+100%);
animation: slide_in_right 0.3s forwards;
> .mobile-parent-nav-menu-item {
display: inline-block;
}
}
/* Only show one submenu expand button at a time (desktop vs mobile) */
.desktop-submenu-expand {
display: none;
@include media(tablet) {
display: inline-block;
}
}
.mobile-submenu-expand {
display: inline-block;
@include media(tablet) {
display: none;
}
}
}
/* Menu Animation */
@keyframes slide_in_right {
100% {
transform: translateX(0%);
}
}
@keyframes fade_in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
No other release has this exact content. See every version of this file.