Advertisement
Guest User

Untitled

a guest
May 24th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.50 KB | None | 0 0
  1. <body class="align">
  2.  
  3. <div class="grid">
  4. <style>
  5. @use postcss-cssnext;
  6. /* helpers/align.css */
  7.  
  8. .align {
  9. align-items: center;
  10. display: flex;
  11. justify-content: center;
  12. }
  13.  
  14. /* helpers/grid.css */
  15.  
  16. :root {
  17. --gridMaxWidth: 24em;
  18. --gridWidth: 90%;
  19. }
  20.  
  21. .grid {
  22. margin-left: auto;
  23. margin-right: auto;
  24. max-width: var(--gridMaxWidth);
  25. width: var(--gridWidth);
  26. }
  27.  
  28. /* helpers/icon.css */
  29.  
  30. .icon {
  31. display: inline-block;
  32. height: 1.25em;
  33. line-height: 1.25em;
  34. margin-right: 0.625em;
  35. text-align: center;
  36. vertical-align: middle;
  37. width: 1.25em;
  38. }
  39.  
  40. .icon--info {
  41. background-color: #e5e5e5;
  42. border-radius: 50%;
  43. }
  44.  
  45. /* layout/base.css */
  46.  
  47. :root {
  48. --bodyBackgroundColor: #eaeaea;
  49. --bodyColor: #999;
  50. --bodyFontFamily: 'Helvetica', 'Arial';
  51. --bodyFontFamilyFallback: sans-serif;
  52. --bodyFontSize: 0.875rem;
  53. --bodyFontWeight: 400;
  54. --bodyLineHeight: 1.5;
  55. }
  56.  
  57. *,
  58. *::before,
  59. *::after {
  60. box-sizing: inherit;
  61. }
  62.  
  63. html {
  64. box-sizing: border-box;
  65. height: 100%;
  66. }
  67.  
  68. body {
  69. background-color: var(--bodyBackgroundColor);
  70. font-family: var(--bodyFontFamily), var(--bodyFontFamilyFallback);
  71. font-size: var(--bodyFontSize);
  72. font-weight: var(--bodyFontWeight);
  73. line-height: var(--bodyLineHeight);
  74. margin: 0;
  75. min-height: 100%;
  76. }
  77.  
  78. /* modules/anchor.css */
  79.  
  80. :root {
  81. --anchorColor: inherit;
  82. --anchorHoverColor: #1dabb8;
  83. }
  84.  
  85. a {
  86. color: var(--anchorColor);
  87. text-decoration: none;
  88. transition: color 0.3s;
  89. }
  90.  
  91. a:hover {
  92. color: var(--anchorHoverColor);
  93. }
  94.  
  95. /* modules/form.css */
  96.  
  97. fieldset {
  98. border: none;
  99. margin: 0;
  100. }
  101.  
  102. input {
  103. appearance: none;
  104. border: none;
  105. font: inherit;
  106. margin: 0;
  107. outline: none;
  108. padding: 0;
  109. }
  110.  
  111. input[type='submit'] {
  112. cursor: pointer;
  113. }
  114.  
  115. .form input[type='email'],
  116. .form input[type='password'] {
  117. width: 100%;
  118. }
  119.  
  120. /* modules/login.css */
  121.  
  122. :root {
  123. --loginBorderRadius: 0.25em;
  124. --loginHeaderBackgroundColor: #282830;
  125.  
  126. --loginInputBorderRadius: 0.25em;
  127. }
  128.  
  129. .login__header {
  130. background-color: var(--loginHeaderBackgroundColor);
  131. border-top-left-radius: var(--loginBorderRadius);
  132. border-top-right-radius: var(--loginBorderRadius);
  133. color: #fff;
  134. padding: 1.5em;
  135. text-align: center;
  136. text-transform: uppercase;
  137. }
  138.  
  139. .login__title {
  140. font-size: 1rem;
  141. margin: 0;
  142. }
  143.  
  144. .login__body {
  145. background-color: #fff;
  146. padding: 1.5em;
  147. position: relative;
  148. }
  149.  
  150. .login__body::before {
  151. background-color: #fff;
  152. content: '';
  153. height: 0.5em;
  154. left: 50%;
  155. margin-left: -0.25em;
  156. margin-top: -0.25em;
  157. position: absolute;
  158. top: 0;
  159. transform: rotate(45deg);
  160. width: 0.5em;
  161. }
  162.  
  163. .login input[type='email'],
  164. .login input[type='password'] {
  165. border: 0.0625em solid #e5e5e5;
  166. padding: 1em 1.25em;
  167. }
  168.  
  169. .login input[type='email'] {
  170. border-top-left-radius: var(--loginInputBorderRadius);
  171. border-top-right-radius: var(--loginInputBorderRadius);
  172. }
  173.  
  174. .login input[type='password'] {
  175. border-bottom-left-radius: var(--loginInputBorderRadius);
  176. border-bottom-right-radius: var(--loginInputBorderRadius);
  177. border-top: 0;
  178. }
  179.  
  180. .login input[type='submit'] {
  181. background-color: #1dabb8;
  182. border-radius: var(--loginInputBorderRadius);
  183. color: #fff;
  184. font-weight: 700;
  185. order: 1;
  186. padding: 0.75em 1.25em;
  187. transition: background-color 0.3s;
  188. }
  189.  
  190. .login input[type='submit']:focus,
  191. .login input[type='submit']:hover {
  192. background-color: #198d98;
  193. }
  194.  
  195. .login__footer {
  196. align-items: center;
  197. background-color: #fff;
  198. border-bottom-left-radius: var(--loginBorderRadius);
  199. border-bottom-right-radius: var(--loginBorderRadius);
  200. display: flex;
  201. justify-content: space-between;
  202. padding-bottom: 1.5em;
  203. padding-left: 1.5em;
  204. padding-right: 1.5em;
  205. }
  206.  
  207. .login__footer p {
  208. margin: 0;
  209. }
  210.  
  211. </style>
  212. <form action="/" method="post" class="form login">
  213.  
  214. <header class="login__header">
  215. <h3 class="login__title">Login</h3>
  216. </header>
  217.  
  218. <div class="login__body">
  219.  
  220. <div class="form__field">
  221. <input type="email" placeholder="Email" required>
  222. </div>
  223.  
  224. <div class="form__field">
  225. <input type="password" placeholder="Password" required>
  226. </div>
  227.  
  228. </div>
  229.  
  230. <footer class="login__footer">
  231. <input type="submit" value="Login">
  232.  
  233. <p><span class="icon icon--info">?</span><a href="#"> Forgot</a>
  234. <p><span class="icon icon--info">?</span><a href="#"> Regiester</a>
  235. </p>
  236. </footer>
  237.  
  238. </form>
  239.  
  240. </div>
  241.  
  242. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement