diff --git a/Natours/starter/css/style.css b/Natours/starter/css/style.css index bc74a7d..b22985a 100644 --- a/Natours/starter/css/style.css +++ b/Natours/starter/css/style.css @@ -95,24 +95,24 @@ body { margin-bottom: 3rem; } .u-center-text { - text-align: center; } + text-align: center !important; } .u-margin-bottom-small { - margin-bottom: 2rem; } + margin-bottom: 2rem !important; } .u-margin-bottom-medium { - margin-bottom: 4rem; } + margin-bottom: 4rem !important; } .u-margin-bottom-big { - margin-bottom: 8rem; } + margin-bottom: 8rem !important; } .u-margin-top-big { - margin-top: 8rem; } + margin-top: 8rem !important; } .u-margin-top-huge { - margin-top: 10rem; } + margin-top: 10rem !important; } -.btn:link, .btn:visited { +.btn, .btn:link, .btn:visited { text-transform: uppercase; text-decoration: none; padding: 1.5rem 4rem; @@ -120,10 +120,12 @@ body { border-radius: 10rem; transition: all 0.2s; position: relative; - font-size: 1.6rem; } + font-size: 1.6rem; + border: none; + cursor: pointer; } .btn--animated { - animation: slideBottom 0.7s ease-out .75s; + animation: slideBottom 0.7s ease-out 0.75s; animation-fill-mode: backwards; } .btn:hover { @@ -133,7 +135,7 @@ body { transform: scaleX(1.4) scaleY(1.6); opacity: 0; } -.btn:active { +.btn:active, .btn:focus { transform: translateY(-0.1rem); box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2); } @@ -168,7 +170,7 @@ body { text-decoration: none; border-bottom: 1px solid #55c57a; padding: 3px; - transition: all .2s; } + transition: all 0.2s; } .btn-text:hover { background-color: #55c57a; @@ -381,6 +383,82 @@ body { width: 100%; object-fit: cover; } +.form__group:not(:last-child) { + margin-bottom: 2rem; } + +.form__input { + font-size: 1.5rem; + font-family: inherit; + color: inherit; + padding: 1.5rem 2rem; + border-radius: 2px; + background-color: rgba(255, 255, 255, 0.5); + border: none; + border-bottom: 3px solid transparent; + width: 90%; + display: block; + transition: all 0.3s; } + .form__input:focus { + outline: none; + box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.1); + border-bottom: 3px solid #55c57a; } + .form__input:focus:invalid { + border-bottom: 3px solid #ff7730; } + .form__input::placeholder { + color: #999; } + +.form__label { + font-size: 1.2rem; + font-weight: 700; + margin-left: 2rem; + margin-top: 0.7rem; + display: block; + transition: all 0.3s; } + +.form__input:placeholder-shown + .form__label { + opacity: 0; + visibility: hidden; + transform: translateY(-4rem); } + +.form__radio-group { + width: 49%; + display: inline-block; } + +.form__radio-input { + display: none; } + +.form__radio-label { + font-size: 1.6rem; + cursor: pointer; + position: relative; + padding-left: 4.5rem; } + +.form__radio-button { + height: 3rem; + width: 3rem; + border: 5px solid #55c57a; + border-radius: 50%; + display: inline-block; + position: absolute; + left: 0; + top: -0.4rem; } + .form__radio-button::after { + content: ""; + display: block; + height: 1.3rem; + width: 1.3rem; + border-radius: 50%; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + background-color: #55c57a; + opacity: 0; + transition: opacity 0.2s; } + +.form__radio-input:checked ~ .form__radio-label .form__radio-button::after { + opacity: 1; } + .header { height: 95vh; background-image: linear-gradient(to right bottom, rgba(126, 213, 111, 0.801), rgba(40, 180, 133, 0.808)), url("../img/hero.jpg"); diff --git a/Natours/starter/index.html b/Natours/starter/index.html index bb3298c..171223a 100644 --- a/Natours/starter/index.html +++ b/Natours/starter/index.html @@ -312,7 +312,7 @@ @@ -322,79 +322,46 @@ +
+
+ + +
+
+ + +
+
+
+ +
- - diff --git a/Natours/starter/sass/abstracts/_variables.scss b/Natours/starter/sass/abstracts/_variables.scss index 59b1162..0ba8338 100644 --- a/Natours/starter/sass/abstracts/_variables.scss +++ b/Natours/starter/sass/abstracts/_variables.scss @@ -13,6 +13,8 @@ $color-grey-light-1: #f7f7f7; $color-grey-light-2: #eee; $color-gray-dark: #777; +$color-gray-dark-2: #999; + $color-white: #fff; $color-black: #000; diff --git a/Natours/starter/sass/base/_utilities.scss b/Natours/starter/sass/base/_utilities.scss index 41bd34d..26377f8 100644 --- a/Natours/starter/sass/base/_utilities.scss +++ b/Natours/starter/sass/base/_utilities.scss @@ -1,23 +1,23 @@ .u-center-text { - text-align: center; + text-align: center !important; } .u-margin-bottom-small { - margin-bottom: 2rem; + margin-bottom: 2rem !important; } .u-margin-bottom-medium { - margin-bottom: 4rem; + margin-bottom: 4rem !important; } .u-margin-bottom-big { - margin-bottom: 8rem; + margin-bottom: 8rem !important; } .u-margin-top-big { - margin-top: 8rem; + margin-top: 8rem !important; } .u-margin-top-huge { - margin-top: 10rem; + margin-top: 10rem !important; } diff --git a/Natours/starter/sass/components/_button.scss b/Natours/starter/sass/components/_button.scss index da949ca..fbefb80 100644 --- a/Natours/starter/sass/components/_button.scss +++ b/Natours/starter/sass/components/_button.scss @@ -1,87 +1,92 @@ .btn { - &:link, - &:visited { - text-transform: uppercase; - text-decoration: none; - padding: 1.5rem 4rem; - display: inline-block; - border-radius: 10rem; - transition: all 0.2s; - position: relative; - font-size: $default-font-size; - } + &, + &:link, + &:visited { + text-transform: uppercase; + text-decoration: none; + padding: 1.5rem 4rem; + display: inline-block; + border-radius: 10rem; + transition: all 0.2s; + position: relative; + font-size: $default-font-size; - &--animated { - animation: slideBottom 0.7s ease-out .75s; - animation-fill-mode: backwards; - } + // Changes to allow usage this class in