$c_1: #D61818; $c_2: #F2E9E4; $c_3: #FFF4D5; $c_4: #C9C6A5; $c_5: #F5E9DA; $c_blob: darken($c_2,2%); $c_blob2: darken($c_blob,2%); $speed: 0.3s; $blob-speed: $speed*2; $stripe-width: 0.2em; $min-width: 20em; $min-size: 22.5em; *, *:before, *:after { box-sizing: border-box; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); -webkit-tap-highlight-color: transparent; // i.e. Nexus5/ } html { height: 100%; font-size: 16px; } body { min-height: 100%; font-family: 'Roboto', sans-serif; font-weight: 200; background-color: $c_1; color: $c_3; min-width: $min-width; margin: 0; padding: 0; overflow-x: hidden; font-weight: 200; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } article { overflow: hidden; margin: 2em 0; //min-height: 100vh; } h2 { font-weight: 200; font-size: 1.4em; line-height: 1.2; } .sidebar { width: 0; position: fixed; z-index: 6; top: 0; right: 100%; bottom: 0; user-select: none; &, * { backface-visibility: hidden; } .menu { position: absolute; left: 0; top:0; right: 0; bottom: 0; padding-right: 2.4em; transition: transform $speed ease-in-out; transition-delay: $speed*3; //background: $c_1; transform: translate3d(2.4em,0,0); .morpher { position: absolute; overflow: hidden; right: 0.2em; top: 1em + 0.04em/$stripe-width - $stripe-width; height: 0; padding-top: $stripe-width; background: $c_2; pointer-events: none; width: 2em; transition-property: transform, top, height, width; transition-delay: $speed*2, 0s, 0s, $speed*2; transition-duration: $speed; } &.open { transform: translate3d(14em,0,0); transition-delay: 0s; @media only screen and (max-width: $min-size) { transform: translate3d($min-width,0,0); } .morpher { pointer-events: all; top: 0; transform: translatex(-2em); width: 12em; height: 100%; transition-delay: $speed, $speed*3, $speed*3, $speed; @media only screen and (max-width: $min-size) { width: $min-width - 2.2; } } .button span:nth-child(1) { transform: rotate(45deg); } .button span:nth-child(2) { transform: rotate(-45deg); } .button span { transition-delay: $speed*2; } } .button { display: block; position: absolute; top: 0; right: 0; height: 2.6em; width: 2.4em; cursor: pointer; span { display: block; background: $c_2; height: $stripe-width; position: absolute; left: 0.2em; right: 0.2em; top: 50%; margin-top: $stripe-width/-2; pointer-events: none; transition: transform $speed ease-in; transition-delay: $speed; &:nth-child(1) { transform: translatey(-0.5 - $stripe-width); } &:nth-child(2) { transform: translatey(0.5 - $stripe-width); } } } ul, li { display: block; list-style: none; margin: 0; padding: 0; } li:last-child { //border-bottom: 1px solid lighten($c_2,5%); } .item { position: relative; overflow: hidden; transition: transform $speed ease-in-out; } a { display: block; color: $c_1; padding: 0.5em 1em; text-decoration: none; //border-top: 1px solid lighten($c_2,5%); //border-bottom: 1px solid darken($c_2,5%); span { position: relative; z-index: 3; pointer-events: none; } &:hover { blob { transition-duration: 0; transition-delay: 0; } blob.scale { box-shadow: 0 0 1em 8em rgba(darken($c_blob, 2%), 0.7) inset; transition-duration: $blob-speed, 0; transition-delay: $speed/2; transform: scale(1); } } } } } .page { display: block; margin: 3em 2.4em 2.4em; padding-right: 11.6em; line-height: 1.2em; max-width: 70em; overflow: visible; backface-visibility: hidden; transition: transform $speed ease-in-out; transition-delay: $speed*3; @media only screen and (max-width: $min-width*2) { padding-right: 0; } &.open { transition-delay: 0; transform: translate3d(11.6em,0,0); @media only screen and (max-width: $min-size) { transform: translate3d($min-width - 2.4,0,0); padding-right: 0; } } .avatar { display: block; width: 100%; max-width: 9em; float: left; margin: 0 1.2em 0 0; border-radius: 100%; overflow: hidden; line-height: 0; shape-outside: circle(50%); @media only screen and (max-width: $min-size) { shape-outside: initial; float: none; width: 100%; max-width: 100%; } figure { margin: 0; padding: 0; background-color: $c_2; } img { width: 100%; display: block; height: auto; border-radisu: inherit; } } } blob { $bs: 25em; display: block; position: absolute; z-index: 0; height: $bs; width: $bs; margin: $bs/-2; background: rgba($c_blob, 0.5); box-shadow: 0 0 0 20em rgba(darken($c_blob, 2%), 0.5) inset; pointer-events: none; border-radius: 100%; transform: scale(0); transition: all $blob-speed cubic-bezier(1,0.22,0.5,0.75); transition-property: transform, box-shadow; &.scale { } &.blob2.scale { background: rgba($c_blob2,1); box-shadow: 0 0 1em 8em rgba(darken($c_blob, 2%), 0.7) inset; z-index: 1; transition-duration: $blob-speed; transition-delay: 0; transform: scale(1); } @media only screen and (max-width: $min-size) { $bs: 43em; z-index: 0; height: $bs; width: $bs; margin: $bs/-2; } } .header { position: fixed; z-index: 5; top: 0; left: 0; right: 0; background: rgba($c_1,0.9); height: 2.4em; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }