Advertisement
Mary_Pieroszkiewicz

Style dla formularaza

May 21st, 2020
1,317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 4.34 KB | None | 0 0
  1. .contact {
  2.  
  3.   &__form {
  4.     display: flex;
  5.     flex-direction: column;
  6.  
  7.     @media #{$tablet_land__1024} {
  8.       margin: 0 40px;
  9.     }
  10.  
  11.     @media #{$HD__screens__1920} {
  12.       margin: 0;
  13.     }
  14.  
  15.     &-title {
  16.       font-family: $font-title--bold;
  17.       font-size: rem(40px);
  18.       padding-bottom: rem(38px);
  19.  
  20.     }
  21.  
  22.     &-title {
  23.       font-family: $font-title;
  24.       font-size: rem(30px);
  25.       padding-bottom: rem(34px);
  26.       text-align: center;
  27.  
  28.       @media #{$mobile_land__640} {
  29.         font-size: rem(40px);
  30.       }
  31.  
  32.     }
  33.  
  34.     &-row {
  35.       display: flex;
  36.       flex-direction: column;
  37.       justify-content: space-between;
  38.       padding-bottom: rem(22px);
  39.  
  40.       @media #{$mobile_land__640} {
  41.         flex-direction: row;
  42.       }
  43.  
  44.       &--3 {
  45.         flex-direction: column;
  46.       }
  47.  
  48.       &__lab {
  49.         color: $oslo-gray;
  50.         font-family: $font-text;
  51.         font-size: rem(15px);
  52.         margin-bottom: rem(10px);
  53.  
  54.         &-text {
  55.           width: 100%;
  56.           padding-left: 21px;
  57.         }
  58.       }
  59.  
  60.       &__link {
  61.         color: $fun-blue;
  62.         text-decoration: underline;
  63.       }
  64.  
  65.       &__btn {
  66.         color: $white;
  67.         font-size: rem(20px);
  68.         font-family: $font-title--bold;
  69.         background-color: $fun-blue;
  70.         padding: rem(12px 54px);
  71.         cursor: pointer;
  72.       }
  73.     }
  74.  
  75.     &-col {
  76.       display: flex;
  77.       flex-direction: column;
  78.       width: 100%;
  79.       padding-bottom: 15px;
  80.  
  81.       @media #{$mobile_land__640} {
  82.         width: calc(100% / 2 - 16px);
  83.       }
  84.  
  85.       &__lab {
  86.         color: $oslo-gray;
  87.         font-family: $font-text;
  88.         font-size: rem(15px);
  89.         margin-bottom: rem(10px);
  90.       }
  91.  
  92.       &__inp {
  93.         border: 0;
  94.         outline: 0;
  95.         border-bottom: 1px solid $catskill-white;
  96.  
  97.         &:focus {
  98.           border-bottom: 1px solid $catskill-white;
  99.         }
  100.  
  101.         //&--check {
  102.         //  &::before {
  103.         //    content: "";
  104.         //    width: 14px;
  105.         //    height: 14px;
  106.         //    background: black;
  107.         //    box-shadow: 0 0 0 4px #fff, 0 0 0 6px black;
  108.         //    transform: scale(0.7);
  109.         //  }
  110.         //}
  111.       }
  112.  
  113.       &__area {
  114.         border: 1px solid $catskill-white;
  115.         resize: none;
  116.         padding: rem(16px);
  117.  
  118.         &:focus {
  119.           border: 1px solid $catskill-white;
  120.         }
  121.       }
  122.     }
  123.  
  124.     &-required {
  125.       &::after {
  126.         content: ' *';
  127.         color: $red-ribbon;
  128.       }
  129.     }
  130.   }
  131. }
  132.  
  133.  
  134. /* ---------------------------------------------------- */
  135. /* walidacja formularza JS */
  136. /* ---------------------------------------------------- */
  137.  
  138. .contact__form input.field-error,
  139. .contact__form textarea.field-error {
  140.   border-color: $red-ribbon;
  141.   outline: none;
  142.   box-shadow: 0 0 0 2px rgba(255,99,71, 0.3);
  143. }
  144.  
  145. .form-error-text {
  146.   color: $red-ribbon;
  147.   font-size: 0.8rem;
  148. }
  149.  
  150. .form-error-inline .form-error-text {
  151.   display: none;
  152. }
  153.  
  154. .contact__form .send-error {
  155.   display:inline-block;
  156.   font-family: sans-serif;
  157.   padding:1rem 2rem;
  158.   color:red;
  159. }
  160.  
  161. @media screen and (max-width:500px) {
  162.   .contact__form .send-error {
  163.     text-align:center;
  164.     display: block;
  165.   }
  166. }
  167.  
  168.  
  169. /* ---------------------------------------------------- */
  170. /* loading */
  171. /* ---------------------------------------------------- */
  172. .elem-is-busy {
  173.   position: relative;
  174.   pointer-events: none;
  175.   opacity: 0.5;
  176. }
  177.  
  178. .elem-is-busy::after {
  179.   position: absolute;
  180.   left: 50%;
  181.   top: 50%;
  182.   width: 20px;
  183.   height: 20px;
  184.   border-radius: 50%;
  185.   border: 2px solid rgba(0, 0, 0, 0.2);
  186.   border-right-color: rgba(0,0,0,0.7);
  187.   transform: translate(-50%, -50%) rotate(0deg);
  188.   content:"";
  189.   animation: rotateSingleLoading 0.3s infinite linear;
  190.   z-index: 10;
  191. }
  192.  
  193. @keyframes rotateSingleLoading {
  194.   from {
  195.     transform: translate(-50%, -50%) rotate(0deg);
  196.   }
  197.   to {
  198.     transform: translate(-50%, -50%) rotate(360deg);
  199.   }
  200. }
  201.  
  202. .form-send-success {
  203.   font-family: sans-serif;
  204.   text-align:center;
  205.   font-size:2rem;
  206.   font-weight:bold;
  207.   border:1px solid #eee;
  208.   color:#333;
  209.   padding:10rem 0;
  210.   margin:3rem auto;
  211.   max-width:40rem;
  212. }
  213.  
  214. .form-send-success strong {
  215.   display: block;
  216.   margin-bottom:0.5rem;
  217. }
  218.  
  219. .form-send-success span {
  220.   font-size: 1rem;
  221.   color:#888;
  222.   font-weight:normal;
  223.   display: block;
  224. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement