#e8e8e8
1.pushable { 2 position: relative; 3 background: transparent; 4 padding: 0px; 5 border: none; 6 cursor: pointer; 7 outline-offset: 4px; 8 outline-color: deeppink; 9 transition: filter 250ms; 10 -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 11} 12 13.shadow { 14 position: absolute; 15 top: 0; 16 left: 0; 17 height: 100%; 18 width: 100%; 19 background: hsl(226, 25%, 69%); 20 border-radius: 8px; 21 filter: blur(2px); 22 will-change: transform; 23 transform: translateY(2px); 24 transition: transform 600ms cubic-bezier(0.3, 0.7, 0.4, 1); 25} 26 27.edge { 28 position: absolute; 29 top: 0; 30 left: 0; 31 height: 100%; 32 width: 100%; 33 border-radius: 8px; 34 background: linear-gradient( 35 to right, 36 hsl(248, 39%, 39%) 0%, 37 hsl(248, 39%, 49%) 8%, 38 hsl(248, 39%, 39%) 92%, 39 hsl(248, 39%, 29%) 100% 40 ); 41} 42 43.front { 44 display: block; 45 position: relative; 46 border-radius: 8px; 47 background: hsl(248, 53%, 58%); 48 padding: 16px 32px; 49 color: white; 50 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, 51 Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; 52 font-weight: 600; 53 text-transform: uppercase; 54 letter-spacing: 1.5px; 55 font-size: 1rem; 56 transform: translateY(-4px); 57 transition: transform 600ms cubic-bezier(0.3, 0.7, 0.4, 1); 58} 59 60.pushable:hover { 61 filter: brightness(110%); 62} 63 64.pushable:hover .front { 65 transform: translateY(-6px); 66 transition: transform 250ms cubic-bezier(0.3, 0.7, 0.4, 1.5); 67} 68 69.pushable:active .front { 70 transform: translateY(-2px); 71 transition: transform 34ms; 72} 73 74.pushable:hover .shadow { 75 transform: translateY(4px); 76 transition: transform 250ms cubic-bezier(0.3, 0.7, 0.4, 1.5); 77} 78 79.pushable:active .shadow { 80 transform: translateY(1px); 81 transition: transform 34ms; 82} 83 84.pushable:focus:not(:focus-visible) { 85 outline: none; 86} 87
1.8K views
1.8K views
Comments
MIT License