404 views
CSSAdd prefixes
1.form-container { 2 width: 320px; 3 border-radius: 0.75rem; 4 background-color: rgba(17, 24, 39, 1); 5 padding: 2rem; 6 color: rgba(243, 244, 246, 1); 7} 8 9.title { 10 text-align: center; 11 font-size: 1.5rem; 12 line-height: 2rem; 13 font-weight: 700; 14} 15 16.form { 17 margin-top: 1.5rem; 18} 19 20.input-group { 21 margin-top: 0.25rem; 22 font-size: 0.875rem; 23 line-height: 1.25rem; 24} 25 26.input-group label { 27 display: block; 28 color: rgba(156, 163, 175, 1); 29 margin-bottom: 4px; 30} 31 32.input-group input { 33 width: 100%; 34 border-radius: 0.375rem; 35 border: 1px solid rgba(55, 65, 81, 1); 36 outline: 0; 37 background-color: rgba(17, 24, 39, 1); 38 padding: 0.75rem 1rem; 39 color: rgba(243, 244, 246, 1); 40} 41 42.input-group input:focus { 43 border-color: rgba(167, 139, 250); 44} 45 46.forgot { 47 display: flex; 48 justify-content: flex-end; 49 font-size: 0.75rem; 50 line-height: 1rem; 51 color: rgba(156, 163, 175,1); 52 margin: 8px 0 14px 0; 53} 54 55.forgot a,.signup a { 56 color: rgba(243, 244, 246, 1); 57 text-decoration: none; 58 font-size: 14px; 59} 60 61.forgot a:hover, .signup a:hover { 62 text-decoration: underline rgba(167, 139, 250, 1); 63} 64 65.sign { 66 display: block; 67 width: 100%; 68 background-color: rgba(167, 139, 250, 1); 69 padding: 0.75rem; 70 text-align: center; 71 color: rgba(17, 24, 39, 1); 72 border: none; 73 border-radius: 0.375rem; 74 font-weight: 600; 75} 76 77.social-message { 78 display: flex; 79 align-items: center; 80 padding-top: 1rem; 81} 82 83.line { 84 height: 1px; 85 flex: 1 1 0%; 86 background-color: rgba(55, 65, 81, 1); 87} 88 89.social-message .message { 90 padding-left: 0.75rem; 91 padding-right: 0.75rem; 92 font-size: 0.875rem; 93 line-height: 1.25rem; 94 color: rgba(156, 163, 175, 1); 95} 96 97.social-icons { 98 display: flex; 99 justify-content: center; 100} 101 102.social-icons .icon { 103 border-radius: 0.125rem; 104 padding: 0.75rem; 105 border: none; 106 background-color: transparent; 107 margin-left: 8px; 108} 109 110.social-icons .icon svg { 111 height: 1.25rem; 112 width: 1.25rem; 113 fill: #fff; 114} 115 116.signup { 117 text-align: center; 118 font-size: 0.75rem; 119 line-height: 1rem; 120 color: rgba(156, 163, 175, 1); 121} 122
HTML
1<div class="form-container"> 2 <p class="title">Login</p> 3 <form class="form"> 4 <div class="input-group"> 5 <label for="username">Username</label> 6 <input type="text" name="username" id="username" placeholder=""> 7 </div> 8 <div class="input-group"> 9 <label for="password">Password</label> 10 <input type="password" name="password" id="password" placeholder=""> 11 <div class="forgot"> 12 <a rel="noopener noreferrer" href="#">Forgot Password ?</a> 13 </div> 14 </div> 15 <button class="sign">Sign in</button> 16 </form> 17 <div class="social-message"> 18 <div class="line"></div> 19 <p class="message">Login with social accounts</p> 20 <div class="line"></div> 21 </div> 22 <div class="social-icons"> 23 <button aria-label="Log in with Google" class="icon"> 24 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="w-5 h-5 fill-current"> 25 <path d="M16.318 13.714v5.484h9.078c-0.37 2.354-2.745 6.901-9.078 6.901-5.458 0-9.917-4.521-9.917-10.099s4.458-10.099 9.917-10.099c3.109 0 5.193 1.318 6.38 2.464l4.339-4.182c-2.786-2.599-6.396-4.182-10.719-4.182-8.844 0-16 7.151-16 16s7.156 16 16 16c9.234 0 15.365-6.49 15.365-15.635 0-1.052-0.115-1.854-0.255-2.651z"></path> 26 </svg> 27 </button> 28 <button aria-label="Log in with Twitter" class="icon"> 29 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="w-5 h-5 fill-current"> 30 <path d="M31.937 6.093c-1.177 0.516-2.437 0.871-3.765 1.032 1.355-0.813 2.391-2.099 2.885-3.631-1.271 0.74-2.677 1.276-4.172 1.579-1.192-1.276-2.896-2.079-4.787-2.079-3.625 0-6.563 2.937-6.563 6.557 0 0.521 0.063 1.021 0.172 1.495-5.453-0.255-10.287-2.875-13.52-6.833-0.568 0.964-0.891 2.084-0.891 3.303 0 2.281 1.161 4.281 2.916 5.457-1.073-0.031-2.083-0.328-2.968-0.817v0.079c0 3.181 2.26 5.833 5.26 6.437-0.547 0.145-1.131 0.229-1.724 0.229-0.421 0-0.823-0.041-1.224-0.115 0.844 2.604 3.26 4.5 6.14 4.557-2.239 1.755-5.077 2.801-8.135 2.801-0.521 0-1.041-0.025-1.563-0.088 2.917 1.86 6.36 2.948 10.079 2.948 12.067 0 18.661-9.995 18.661-18.651 0-0.276 0-0.557-0.021-0.839 1.287-0.917 2.401-2.079 3.281-3.396z"></path> 31 </svg> 32 </button> 33 <button aria-label="Log in with GitHub" class="icon"> 34 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="w-5 h-5 fill-current"> 35 <path d="M16 0.396c-8.839 0-16 7.167-16 16 0 7.073 4.584 13.068 10.937 15.183 0.803 0.151 1.093-0.344 1.093-0.772 0-0.38-0.009-1.385-0.015-2.719-4.453 0.964-5.391-2.151-5.391-2.151-0.729-1.844-1.781-2.339-1.781-2.339-1.448-0.989 0.115-0.968 0.115-0.968 1.604 0.109 2.448 1.645 2.448 1.645 1.427 2.448 3.744 1.74 4.661 1.328 0.14-1.031 0.557-1.74 1.011-2.135-3.552-0.401-7.287-1.776-7.287-7.907 0-1.751 0.62-3.177 1.645-4.297-0.177-0.401-0.719-2.031 0.141-4.235 0 0 1.339-0.427 4.4 1.641 1.281-0.355 2.641-0.532 4-0.541 1.36 0.009 2.719 0.187 4 0.541 3.043-2.068 4.381-1.641 4.381-1.641 0.859 2.204 0.317 3.833 0.161 4.235 1.015 1.12 1.635 2.547 1.635 4.297 0 6.145-3.74 7.5-7.296 7.891 0.556 0.479 1.077 1.464 1.077 2.959 0 2.14-0.020 3.864-0.020 4.385 0 0.416 0.28 0.916 1.104 0.755 6.4-2.093 10.979-8.093 10.979-15.156 0-8.833-7.161-16-16-16z"></path> 36 </svg> 37 </button> 38 </div> 39 <p class="signup">Don't have an account? 40 <a rel="noopener noreferrer" href="#" class="">Sign up</a> 41 </p> 42</div>