Created
June 29, 2018 15:37
-
-
Save Restoration/5697d1a85620d06c23bd954d9a31064b to your computer and use it in GitHub Desktop.
Button
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <button class="btn draw-border">Login</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .draw-border { | |
| box-shadow: inset 0 0 0 4px #58afd1; | |
| color: #58afd1; | |
| transition: color 0.25s 0.08333s; | |
| position: relative; | |
| } | |
| .draw-border::before, | |
| .draw-border::after { | |
| border: 0 solid transparent; | |
| box-sizing: border-box; | |
| content: ''; | |
| pointer-events: none; | |
| position: absolute; | |
| width: 0; | |
| height: 0; | |
| bottom: 0; | |
| right: 0; | |
| } | |
| .draw-border::before { | |
| border-bottom-width: 4px; | |
| border-left-width: 4px; | |
| } | |
| .draw-border::after { | |
| border-top-width: 4px; | |
| border-right-width: 4px; | |
| } | |
| .draw-border:hover { | |
| color: #ffe593; | |
| } | |
| .draw-border:hover::before, | |
| .draw-border:hover::after { | |
| border-color: #ffe593; | |
| transition: border-color 0s, width 0.25s, height 0.25s; | |
| width: 100%; | |
| height: 100%; | |
| } | |
| .draw-border:hover::before { | |
| transition-delay: 0s, 0s, 0.25s; | |
| } | |
| .draw-border:hover::after { | |
| transition-delay: 0s, 0.25s, 0s; | |
| } | |
| .btn { | |
| background: none; | |
| border: none; | |
| cursor: pointer; | |
| line-height: 1.5; | |
| font: 700 1.2rem "Roboto Slab", sans-serif; | |
| padding: 1em 2em; | |
| letter-spacing: 0.05rem; | |
| } | |
| .btn:focus { | |
| outline: 2px dotted #55d7dc; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment