/* ----------------------------- */ /* ==Buttons */ /* ----------------------------- */ /* preferably use // see doc : https://knacss.com/styleguide.html#buttons .nav-button { padding: 0; background-color: transparent; outline: 0; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; & > * { display: inline-flex; vertical-align: top; flex-direction: column; justify-content: space-between; align-items: stretch; height: $burger-size; width: $burger-size; padding: $burger-padding; background-color: $burger-background; background-image: linear-gradient($burger-color, $burger-color); background-position: center; background-repeat: no-repeat; background-origin: content-box; background-size: 100% $burger-weight; transition: .25s; transition-property: transform, background; will-change: transform, background; &::before, &::after { content: ""; height: $burger-weight; background: $burger-color; transition: .25s; transition-property: transform, top; will-change: transform, top; } } &:hover { & > * { background-color: $burger-hover-background; } } &:focus { outline: 0; } &.is-active { & > * { background-image: none; justify-content: center; &::before { transform: translateY(50%) rotate3d(0,0,1,45deg); } &::after { transform: translateY(-50%) rotate3d(0,0,1,-45deg); } } } }