Guest User

Untitled

a guest
Mar 19th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.08 KB | None | 0 0
  1. &__input {
  2. position: relative;
  3. width: calc(100% - 28px);
  4. max-width: 290px;
  5. margin-bottom: 60px;
  6. &--filled {
  7. .contact__input-field {
  8. opacity: 1;
  9. transition-delay: 0.3s;
  10. }
  11. .contact__input-label:before {
  12. transform: translate3d(-10%, 0, 0);
  13. border: 1px solid $green;
  14. border-right: none;
  15. }
  16. .contact__input-label:after {
  17. transform: translate3d(10%, 0, 0);
  18. border: 1px solid $green;
  19. border-left: none;
  20. }
  21. .contact__input-label-content {
  22. animation: anim-input 0.3s forwards;
  23. color: $green;
  24. @media (max-width: 768px) {
  25. animation: anim-input2 0.3s forwards;
  26. }
  27. }
  28. }
  29. @media (max-width: 1024px) {
  30. margin: 0 24px 60px 24px;
  31. }
  32. @media (max-width: 768px) {
  33. margin: 0 16px 34px 16px;
  34. }
  35. @media (max-width: 480px) {
  36. max-width: 360px;
  37. margin: 0 0 34px 0;
  38. }
  39. }
  40. &__input-field {
  41. width: 100%;
  42. height: 60px;
  43. position: relative;
  44. display: block;
  45. padding: 10px;
  46. border: none;
  47. border-radius: 0;
  48. background: transparent;
  49. font: 400 14px/1 Open Sans, sans-serif;
  50. text-align: center;
  51. color: $gray;
  52. opacity: 0;
  53. transition: opacity 0.3s;
  54. &:hover {
  55. &+.contact__input-label:before {
  56. border: 1px solid $green;
  57. border-right: none;
  58. }
  59. &+.contact__input-label:after {
  60. border: 1px solid $green;
  61. border-left: none;
  62. }
  63. }
  64. &:focus {
  65. outline: none;
  66. opacity: 1;
  67. transition-delay: 0.3s;
  68. &+.contact__input-label:before {
  69. transform: translate3d(-10%, 0, 0);
  70. border: 1px solid $green;
  71. border-right: none;
  72. }
  73. &+.contact__input-label:after {
  74. transform: translate3d(10%, 0, 0);
  75. border: 1px solid $green;
  76. border-left: none;
  77. }
  78. &+.contact__input-label {
  79. .contact__input-label-content {
  80. animation: anim-input 0.3s forwards;
  81. color: $green;
  82. @media (max-width: 768px) {
  83. animation: anim-input2 0.3s forwards;
  84. }
  85. }
  86. }
  87. }
  88. &--invalid {
  89. outline: none;
  90. opacity: 1;
  91. transition-delay: 0.3s;
  92. &+.contact__input-label:before {
  93. transform: translate3d(-10%, 0, 0);
  94. border: 1px solid $red;
  95. border-right: none;
  96. }
  97. &+.contact__input-label:after {
  98. transform: translate3d(10%, 0, 0);
  99. border: 1px solid $red;
  100. border-left: none;
  101. }
  102. }
  103. }
  104. &__input-label {
  105. display: inline-block;
  106. width: 100%;
  107. height: 60px;
  108. position: absolute;
  109. top: 0;
  110. left: 0;
  111. padding: 0 10px;
  112. font: 300 16px/1 Source Sans Pro, sans-serif;
  113. color: $gray1;
  114. user-select: none;
  115. pointer-events: none;
  116. &:before {
  117. content: '';
  118. position: absolute;
  119. top: 0;
  120. left: 0;
  121. width: 50%;
  122. height: 100%;
  123. border: 1px solid $lightgray3;
  124. border-radius: 15px 0 0 15px;
  125. transition: transform 0.3s;
  126. border-right: none;
  127. }
  128. &:after {
  129. content: '';
  130. position: absolute;
  131. top: 0;
  132. left: 50%;
  133. width: 50%;
  134. height: 100%;
  135. border: 1px solid $lightgray3;
  136. border-radius: 0 15px 15px 0;
  137. border-left: none;
  138. transition: transform 0.3s;
  139. }
  140. }
Add Comment
Please, Sign In to add comment