mirror of
https://github.com/google/pebble.git
synced 2025-04-01 15:24:04 +00:00
92 lines
1.8 KiB
SCSS
Executable file
92 lines
1.8 KiB
SCSS
Executable file
// Sizing left (default)
|
|
@mixin mm_sizing( $cls: "",
|
|
$width: $mm_width, $minWidth: $mm_minWidth, $maxWidth: $mm_maxWidth
|
|
) {
|
|
.mm-menu#{$cls}
|
|
{
|
|
width: percentage( $width );
|
|
min-width: $minWidth;
|
|
max-width: $maxWidth;
|
|
}
|
|
html.mm-opening#{$cls}
|
|
{
|
|
.mm-page,
|
|
#mm-blocker
|
|
{
|
|
@include mm-webkit-prefix( 'transform', translate( percentage( $width ), 0 ) );
|
|
}
|
|
}
|
|
@media all and (max-width: $minWidth / $width ) {
|
|
html.mm-opening#{$cls}
|
|
{
|
|
.mm-page,
|
|
#mm-blocker
|
|
{
|
|
@include mm-webkit-prefix( 'transform', translate( $minWidth, 0 ) );
|
|
}
|
|
}
|
|
}
|
|
@media all and (min-width: $maxWidth / $width ) {
|
|
html.mm-opening#{$cls}
|
|
{
|
|
.mm-page,
|
|
#mm-blocker
|
|
{
|
|
@include mm-webkit-prefix( 'transform', translate( $maxWidth, 0 ) );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Sizing right
|
|
@mixin mm_sizing_right( $cls: "",
|
|
$width: $mm_width, $minWidth: $mm_minWidth, $maxWidth: $mm_maxWidth
|
|
) {
|
|
html.mm-right.mm-opening#{$cls}
|
|
{
|
|
.mm-page,
|
|
#mm-blocker
|
|
{
|
|
@include mm-webkit-prefix( 'transform', translate( -( percentage( $width ) ), 0 ) );
|
|
}
|
|
}
|
|
@media all and ( max-width: $minWidth / $width ) {
|
|
html.mm-right.mm-opening#{$cls}
|
|
{
|
|
.mm-page,
|
|
#mm-blocker
|
|
{
|
|
@include mm-webkit-prefix( 'transform', translate( -$minWidth, 0 ) );
|
|
}
|
|
}
|
|
}
|
|
@media all and ( min-width: $maxWidth / $width ) {
|
|
html.mm-right.mm-opening#{$cls}
|
|
{
|
|
.mm-page,
|
|
#mm-blocker
|
|
{
|
|
@include mm-webkit-prefix( 'transform', translate( -$maxWidth, 0 ) );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Sizing z-position
|
|
@mixin mm_sizing_zposition( $cls: "",
|
|
$height: $mm_height, $minHeight: $mm_minHeight, $maxHeight: $mm_maxHeight
|
|
) {
|
|
|
|
// top
|
|
// bottom
|
|
.mm-menu.mm-front#{$cls}
|
|
{
|
|
&.mm-top,
|
|
&.mm-bottom
|
|
{
|
|
height: percentage( $height );
|
|
min-height: $minHeight;
|
|
max-height: $maxHeight;
|
|
}
|
|
}
|
|
}
|