You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

143 lines
2.9 KiB
SCSS

///
/// Atmosphere by Pixelarity
/// pixelarity.com | hello@pixelarity.com
/// License: pixelarity.com/license
///
/* Menu */
#page-wrapper {
@include vendor('transition', 'filter 0.25s ease');
}
#menu {
@include vendor('align-items', 'center');
@include vendor('display', 'flex');
@include vendor('justify-content', 'center');
@include vendor('pointer-events', 'none');
@include vendor('transition', ('opacity #{_duration(menu)} ease', 'visibility #{_duration(menu)}'));
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
background-color: transparentize(desaturate(darken(_palette(bg-alt), 10), 5), 0.1);
cursor: default;
height: 100%;
left: 0;
opacity: 0;
position: fixed;
text-align: center;
top: 0;
visibility: hidden;
width: 100%;
padding: 1.5em;
z-index: _misc(z-index-base) + 2;
.inner {
@include padding(2.5em, 1.5em);
@include vendor('transform', 'translateY(0.5em)');
@include vendor('transition', ('opacity #{_duration(menu)} ease','transform #{_duration(menu)} ease'));
-webkit-overflow-scrolling: touch;
background: _palette(accent1, bg);
border-radius: _size(border-radius);
color: _palette(accent1, fg);
display: block;
max-width: 100%;
opacity: 0;
position: relative;
text-transform: uppercase;
width: 24em;
}
h2 {
color: inherit;
border-bottom: solid 2px _palette(accent1, border);
padding-bottom: 1em;
}
.close {
@include icon(false, solid);
content: '';
cursor: pointer;
display: block;
height: 4em;
overflow: hidden;
position: absolute;
right: 0;
text-align: center;
text-indent: 4em;
top: 0;
width: 4em;
color: _palette(accent1, fg-bold);
&:before {
content: '\f00d';
position: absolute;
top: 0.75em;
right: 0.75em;
font-size: 1.25em;
width: 1em;
height: 1em;
line-height: 1em;
display: block;
text-indent: 0;
}
}
.links {
list-style: none;
margin-bottom: (_size(element-margin) - 0.5em);
padding: 0;
li {
padding: 0;
a {
background-color: transparent;
border-radius: _size(border-radius);
border: 0;
color: inherit;
display: block;
font-weight: _font(weight);
line-height: 1.85em;
padding: 0.75em 0;
text-decoration: none;
&:hover {
color: _palette(accent1, bg);
background-color: _palette(accent1, fg-bold);
}
}
}
}
@include breakpoint('<=small') {
.inner {
max-height: 100%;
overflow-y: auto;
overflow-x: hidden;
.close {
background-size: 1.5em 1.5em;
}
}
}
}
body.is-menu-visible {
#page-wrapper {
@include vendor('filter', 'blur(1.5px)');
}
#menu {
@include vendor('pointer-events', 'auto');
opacity: 1;
visibility: visible;
.inner {
@include vendor('transform', 'translateY(0)');
opacity: 1;
}
}
}