_ui.scss 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. $box-shadow: 0 2px 2px 0 rgba(0,0,0,.16), 0 0 2px 0 rgba(0,0,0,.12);
  2. $phone: "(max-width: 839px)";
  3. @mixin button-reset {
  4. border: none;
  5. font: inherit;
  6. color: inherit;
  7. background-color: transparent;
  8. cursor: pointer;
  9. box-shadow: 0;
  10. outline: 0;
  11. }
  12. @mixin lightInput() {
  13. width: 100%;
  14. position: relative;
  15. margin-bottom: $spacing-regular;
  16. input,
  17. textarea {
  18. width: 100%;
  19. border: 0;
  20. padding: 4px 0;
  21. border-bottom: 1px solid #ccc;
  22. background-color: transparent;
  23. }
  24. span {
  25. position: absolute;
  26. display: block;
  27. width: 100%;
  28. height: 100%;
  29. top: 0;
  30. left: 0;
  31. pointer-events: none;
  32. }
  33. span::before {
  34. content: "";
  35. display: block;
  36. position: absolute;
  37. bottom: 0px;
  38. left: 0;
  39. width: 0;
  40. height: 1px;
  41. -webkit-transition: all 0.4s;
  42. -o-transition: all 0.4s;
  43. -moz-transition: all 0.4s;
  44. transition: all 0.4s;
  45. background: #7f7f7f;
  46. }
  47. input:focus + span::before,
  48. textarea:focus + span::before {
  49. width: 100%;
  50. }
  51. input.has-value + span::before,
  52. textarea.has-value + span::before {
  53. width: 100%;
  54. }
  55. }