This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
studentersamfundet.no/dns2015/app/styles/_menu.scss
T
nikolark 969c63c752 New style wordpress
This enables automagic updates of WP

- Delete wordpress install
- Move theme(s) to top
- Move local plugins to ./plugins
- Simplify i18n
2017-07-05 01:03:17 +02:00

187 lines
3.6 KiB
SCSS

#static-menu {
font-size: rem-calc(20);
display: none;
@media #{$large-up} {
display: block;
@include grid-column($columns:7);
}
a, a:link {
color: #fff;
font-family: $header-font-family;
font-weight: 500;
font-size: 1.5em;
text-decoration: none;
display: block;
width: 100%;
height: 100%;
padding: 20px 10px;
&:before {
content: '';
padding-right: 6px;
border-left: 2px solid transparent;
}
}
a:hover:before {
border-left: 2px solid white;
}
ul {
@include block-grid;
position: relative;
li {
padding-bottom: 0;
}
}
a:hover + .sub-menu {
display: block;
}
.menu-item-has-children {
position: relative;
}
.sub-menu {
display: none;
position: absolute;
left: 0;
top: 64px;
z-index: 10;
margin-left: 0;
background-color: $primary-color;
box-shadow: rgba(0, 0, 0, 0.3) 1px 1px 1px;
&:hover {
display: block;
}
li {
float: none;
padding: 0;
}
a {
display: block;
padding: 12px 22px;
}
}
}
#main-menu {
position: fixed;
top: 0;
right: -200px;
background-color: white;
width: 200px;
height: 100%;
transition: transform ease 0.21s, right ease 0.21s;
z-index: 1;
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
&.visible {
right: 0;
}
ul {
position: relative;
margin: 0;
padding: 0;
}
li {
list-style: none;
margin: 0;
padding: 0;
&:first-child {
margin-top: 36*2px;
}
}
a, a:link {
color: #333;
font-family: $header-font-family;
font-weight: 500;
font-size: 1.3em;
text-decoration: none;
display: block;
padding: 10px 16px;
border-left: 4px solid transparent;
border-bottom: 1px solid #efefef;
background-color: transparent;
&:hover {
border-left: 4px solid $primary-color;
}
}
/* if 3D transform support use it (less jank) */
.csstransforms3d .drawer-menu {
transform: translate3d(-100%, 0, 0);
&.visible {
transform: translate3d(0, 0, 0);
}
}
.no-csstransforms3d .drawer-menu.visible {
right: -200px;
}
.page_item_has_children {
position: relative;
&::before {
content: '▾';
position: absolute;
right: 10px;
top: 50%;
margin-top: -16px;
}
ul {
display: none;
}
}
}
/* Menu toggle */
.menu-toggle {
position: absolute;
top: 18px;
right: 16px;
display: inline-block;
z-index: 2;
padding: 12px 6px;
@media #{$medium-up} {
top: 32px;
}
svg {
width: 32px;
height: 24px;
g {
transition: fill ease-in-out 0.2s;
}
}
&.inverted svg g {
fill: $primary-color;
}
}
.secondary-navigation {
li {
padding-top: 4px;
padding-bottom: 4px;
}
.page_item {
display: none;
}
.current_page_ancestor,
.current_page_item {
display: list-item;
}
.current_page_item {
font-weight: bold;
> .children .page_item {
display:list-item;
font-weight: normal;
}
}
}