UNPKG

metro4

Version:

The front-end framework for Build responsive, mobile-first projects on the web with the first front-end component library in Metro Style

132 lines (114 loc) 2.86 kB
@import (once) "../../include/vars"; @import (once) "../../include/mixins"; .hamburger, .nav-button { display: inline-block; font-weight: 400; text-align: center; white-space: nowrap; vertical-align: middle; user-select: none; border: 1px solid transparent; padding: 0; font-size: 14px; line-height: 36px; transition: @transition-short; background-color: transparent; color: @white; cursor: pointer; outline: none; width: 36px; height: 36px; .line { width: 30px; background-color: @white; display: block; transition: all 0.3s ease-in-out; height: 3px; margin: 4px auto; } &.dark { .line { background-color: @dark; } } } .hamburger, .nav-button { &.menu-down, &.chevron-down { .line:nth-child(2) { transition-delay: .3s; } &.active { .rotate(90deg); .line:nth-child(2) { opacity: 0; transition: none; } .line:nth-child(1), .line:nth-child(3) { width: 20px; transform-origin: right; margin: -4px 8px; } .line:nth-child(1) { .rotate(45deg); .translateY(6px); } .line:nth-child(3) { .rotate(-45deg); .translateY(-6px); } } } &.menu-up, &.chevron-up { .line:nth-child(2) { transition-delay: .3s; } &.active { .rotate(-90deg); .line:nth-child(2) { opacity: 0; transition: none; } .line:nth-child(1), .line:nth-child(3) { width: 20px; transform-origin: right; margin: -4px 8px; } .line:nth-child(1) { .rotate(45deg); .translateY(6px); } .line:nth-child(3) { .rotate(-45deg); .translateY(-6px); } } } &.arrow-left { &.active { .line:nth-child(1), .line:nth-child(3) { width: 20px; margin-left: 0; } .line:nth-child(1) { .rotate(-45deg); } .line:nth-child(3) { .rotate(45deg); } } } &.arrow-right { &.active { .line:nth-child(1), .line:nth-child(3) { width: 20px; margin-right: 0; } .line:nth-child(1) { .rotate(45deg); } .line:nth-child(3) { .rotate(-45deg); } } } }