feat/fix(responsividade/carrinhoVazio): Adiciona responsividade do carrinho cheio e corrige erro do carrinho vazio

This commit is contained in:
amanda almeida 2022-12-16 23:13:32 -03:00
parent 4573a2c610
commit 863cae0787
4 changed files with 663 additions and 223 deletions

View File

@ -1,11 +1,6 @@
.container-cart { .container-cart {
margin: 0 auto; margin: 0 auto;
@include mq(md, max) {
width: 100%;
margin: 0;
}
h1 { h1 {
font-weight: 700; font-weight: 700;
font-size: 24px; font-size: 24px;
@ -15,12 +10,26 @@
color: $color-black-400; color: $color-black-400;
margin: 16px 0; margin: 16px 0;
@include mq(xl, min) {
font-size: 48px;
line-height: 65px;
}
@include mq(md, max) { @include mq(md, max) {
margin: 16px; margin: 16px;
} }
} }
.cart-template {
@include mq(md, max) {
display: flex !important;
flex-direction: column;
}
}
.cart-template-holder { .cart-template-holder {
width: 100%; width: 100%;
} }
@ -33,6 +42,20 @@
&-items { &-items {
@include mq(reset, max) {
display: table !important;
tbody {
display: table-row-group !important;
}
tr {
display: table-row !important;
margin-top: 0 !important;
border: 0 !important;
}
}
th, th,
td { td {
text-align: start; text-align: start;
@ -46,6 +69,11 @@
line-height: 16px; line-height: 16px;
color: $color-black-400; color: $color-black-400;
padding-bottom: 17px; padding-bottom: 17px;
@include mq(xl, min) {
font-size: 28px;
line-height: 33px;
}
} }
@include mq(md, max) { @include mq(md, max) {
@ -53,21 +81,49 @@
} }
} }
th,
td,
input,
a {
padding: 0;
}
.icon-question-sign { .icon-question-sign {
display: none; display: none;
} }
tr {
@include mq(md, max) {
position: relative;
}
.product-image { .product-image {
width: 60px; width: 4%;
min-width: 60px;
height: 60px; height: 60px;
padding-right: 16px; padding-right: 16px;
img { img {
width: 100%; width: 4%;
max-width: 60px; min-width: 60px;
height: 100%; height: 100%;
} }
@include mq(reset, max) {
position: static !important;
padding-top: 16px;
}
@include mq(xl, min) {
min-width: 146px;
height: 146px;
img {
min-width: 146px;
}
}
} }
.product-name { .product-name {
@ -79,14 +135,36 @@
font-size: 12px; font-size: 12px;
line-height: 14px; line-height: 14px;
color: $color-black; color: $color-black;
}
@include mq(md, max) { @include mq(xl, min) {
font-size: 24px;
line-height: 28px;
}
}
.brand, .brand,
.seller { .seller {
display: none; display: none !important;
} }
@include mq(xl, min) {
width: 359px;
padding-right: 273px;
}
@include mq(md, max) {
display: table-cell !important;
position: absolute;
left: 92px;
top: 0;
margin: 0 !important;
padding: 0 !important;
width: 100%;
}
@include mq(reset, max) {
top: 16px;
left: 70px;
} }
} }
@ -101,11 +179,21 @@
font-size: 12px; font-size: 12px;
line-height: 14px; line-height: 14px;
color: $color-gray8; color: $color-gray8;
@include mq(xl, min) {
font-size: 24px;
line-height: 28px;
}
} }
@include mq(md, max) { @include mq(md, max) {
display: none; display: none;
} }
@include mq(xl, min) {
width: 111px;
padding-right: 176px;
}
} }
td.product-price { td.product-price {
@ -120,36 +208,69 @@
text-transform: lowercase; text-transform: lowercase;
} }
.list-price { .list-price {
font-size: 12px; font-size: 12px;
line-height: 14px; line-height: 14px;
text-decoration-line: line-through; text-decoration-line: line-through;
color: $color-gray8; color: $color-gray8;
@include mq(xl, min) {
font-size: 24px;
line-height: 28px;
}
} }
.best-price { .best-price {
font-size: 14px; font-size: 14px;
line-height: 16px; line-height: 16px;
color: #292929; color: $color-black-400;
@include mq(xl, min) {
font-size: 28px;
line-height: 33px;
}
} }
.price-details { .price-details {
display: none; display: none;
} }
@include mq(md, max) {
position: absolute;
bottom: 0;
right: 0;
padding: 0;
margin: 0 !important;
text-align: right;
}
@include mq(xl, min) {
width: 198px;
padding-right: 95px;
}
} }
.quantity { .quantity {
position: relative; position: relative;
width: 99px; width: 99px !important;
input { input {
box-sizing: border-box; box-sizing: border-box;
border: 1px solid $color-gray3; border: 1px solid $color-gray3;
width: 100%; width: 100%;
height: 34PX; height: 34px;
border-radius: 8px; border-radius: 8px;
margin: 0; margin: 0;
font-family: 'Tenor Sans';
font-size: 14px;
line-height: 16px;
color: $color-black;
@include mq(xl, min) {
font-size: 28px;
line-height: 33px;
}
} }
@ -158,15 +279,23 @@
position: absolute; position: absolute;
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
font-size: 16px;
&::before { &::before {
width: 16px; width: 16px;
height: 16px; height: 16px;
color: $color-blue2; color: $color-blue2;
} }
}
}
@include mq(xl, min) {
font-size: 32px;
&::before {
width: 32px;
height: 32px;
}
}
}
.icon-plus-sign { .icon-plus-sign {
right: 11px; right: 11px;
@ -176,12 +305,30 @@
left: 11px; left: 11px;
} }
th, @include mq(md, max) {
td, position: absolute;
input, left: 92px;
bottom: 0;
margin: 0 !important;
a { a {
padding: 0; position: initial;
} }
input {
width: 100% !important;
}
}
@include mq(reset, max) {
left: 60px;
}
@include mq(xl, min) {
width: 135px !important;
}
}
} }
.quantity-price { .quantity-price {
@ -194,21 +341,51 @@
font-weight: 700; font-weight: 700;
font-size: 14px; font-size: 14px;
line-height: 19px; line-height: 19px;
color: #292929; color: $color-black-400;
@include mq(xl, min) {
font-size: 28px;
line-height: 38px;
}
} }
@include mq(md, max) { @include mq(md, max) {
display: none; display: none;
} }
@include mq(xl, min) {
width: 154px;
padding-left: 175px;
padding-right: 28px;
}
} }
.item-remove { .item-remove {
width: 10px; width: 10px !important;
a { a {
font-family: initial; font-family: initial;
font-size: 10px; font-size: 10px;
color: #C4C4C4; color: $color-gray6;
@include mq(xl, min) {
font-size: 20px;
}
}
@include mq(md, max) {
position: absolute;
right: 0;
top: 0;
}
@include mq(reset, max) {
top: 8px !important;
}
@include mq(xl, min) {
width: 20px !important;
}
} }
} }
@ -220,15 +397,49 @@
.cart-more-options { .cart-more-options {
margin: 0; margin: 0;
@include mq(md, max) {
margin-left: 16px;
margin-bottom: 48px;
width: 375px;
}
@include mq(sm, max) {
margin-left: 0;
width: 100%;
}
} }
#shipping-preview-container { #shipping-preview-container {
max-width: 47.1%;
@include mq(xl, min) {
max-width: 47.4%;
}
@include mq(md, max) {
max-width: 375px;
}
@include mq(sm, max) {
width: 100%;
}
.srp-main-title { .srp-main-title {
font-weight: 400; font-weight: 400;
font-size: 24px; font-size: 24px;
line-height: 33px; line-height: 33px;
margin-bottom: 11px; margin-bottom: 11px;
color: $color-black; color: $color-black;
@include mq(sm, max) {
margin-left: 16px;
}
@include mq(xl, min) {
font-size: 48px;
line-height: 65px;
}
} }
.srp-description { .srp-description {
@ -238,11 +449,31 @@
margin: 0; margin: 0;
margin-bottom: 10px; margin-bottom: 10px;
max-width: 276px; max-width: 276px;
@include mq(md, max) {
width: 276px;
}
@include mq(sm, max) {
width: 100%;
padding: 0 16px;
}
@include mq(xl, min) {
max-width: 552px;
font-size: 28px;
line-height: 36px;
}
} }
.srp-data { .srp-data {
margin: 0; margin: 0;
width: 280px; width: 100%;
@include mq(md, max) {
padding: 16px;
}
.shp-open-options { .shp-open-options {
width: 157px; width: 157px;
@ -276,6 +507,16 @@
} }
} }
@include mq(xl, min) {
width: 230px;
font-size: 28px;
line-height: 38px;
}
}
.srp-pickup-empty,
.srp-skeleton {
position: absolute;
} }
.srp-toggle { .srp-toggle {
@ -286,19 +527,38 @@
width: 100%; width: 100%;
background: $color-white; background: $color-white;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2); box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
height: 36px;
border-radius: 100px; border-radius: 100px;
font-weight: 400;
font-size: 14px; @include mq(xl, min) {
line-height: 19px; height: 57px;
text-transform: uppercase; }
} }
&__delivery { &__delivery {
color: $color-black; color: $color-black;
font-weight: 400;
font-size: 14px;
line-height: 19px;
text-transform: uppercase;
@include mq(xl, min) {
font-size: 28px;
line-height: 38px;
}
} }
&__pickup { &__pickup {
color: $color-gray6; color: $color-gray6;
font-weight: 400;
font-size: 14px;
line-height: 19px;
text-transform: uppercase;
@include mq(xl, min) {
font-size: 28px;
line-height: 38px;
}
} }
.blue { .blue {
@ -320,30 +580,67 @@
display: none; display: none;
} }
.srp-postal-code__form {
width: 100%;
}
.vtex-shipping-preview-0-x-postalCodeForgotten { .vtex-shipping-preview-0-x-postalCodeForgotten {
position: absolute;
margin: 0; margin: 0;
width: 100%;
.ship-postalCode { .ship-postalCode {
width: 172px; width: 172px;
margin-right: 8px; margin-right: 8px;
@include mq(md, max) {
width: 215px;
}
@include mq(sm, max) {
width: 62.7%;
}
@include mq(xl, min) {
width: 61%;
min-width: 334px;
margin-right: 18px;
}
label { label {
font-size: 12px; font-size: 12px;
line-height: 16px; line-height: 16px;
color: $color-black; color: $color-black;
margin-bottom: 2px; margin-bottom: 2px;
@include mq(xl, min) {
font-size: 24px;
line-height: 33px;
}
} }
.input-small { .input-small {
width: 172px; width: 100%;
height: 36px; height: 36px;
background: $color-white; background: $color-white;
border: 1px solid $color-gray6; border: 1px solid $color-gray6;
border-radius: 5px; border-radius: 5px;
margin-bottom: 5px;
font-family: 'Tenor Sans';
font-size: 12px;
line-height: 14px;
padding-left: 11px;
@include mq(xl, min) {
height: 55px;
font-size: 24px;
line-height: 28px;
}
} }
small { small {
margin-top: 4px;
a { a {
font-family: 'Tenor Sans'; font-family: 'Tenor Sans';
@ -353,11 +650,22 @@
text-decoration-line: underline; text-decoration-line: underline;
color: $color-black; color: $color-black;
@include mq(xl, min) {
font-size: 20px;
line-height: 23px;
}
} }
} }
.help { .help {
position: absolute; position: absolute;
font-size: 10px;
line-height: 12px;
@include mq(xl, min) {
font-size: 20px;
line-height: 23px;
}
} }
} }
@ -371,12 +679,23 @@
font-weight: 700; font-weight: 700;
font-size: 14px; font-size: 14px;
line-height: 19px; line-height: 19px;
text-align: center; padding: 0;
display: flex;
align-items: center;
justify-content: center;
letter-spacing: 0.05em; letter-spacing: 0.05em;
text-transform: uppercase; text-transform: uppercase;
color: $color-white; color: $color-white;
margin-bottom: 4px; margin-bottom: 4px;
@include mq(xl, min) {
width: 35.4%;
height: 55px;
font-size: 28px;
line-height: 38px;
margin-bottom: 0;
}
@include mq(lg, min) { @include mq(lg, min) {
&:hover { &:hover {
background: lighten($color-blue2, 10); background: lighten($color-blue2, 10);
@ -392,6 +711,15 @@
background: lighten($color-blue2, 10); background: lighten($color-blue2, 10);
} }
} }
@include mq(md, max) {
width: 120px;
}
@include mq(sm, max) {
width: 35%;
}
} }
} }
@ -409,6 +737,12 @@
letter-spacing: 0.05em; letter-spacing: 0.05em;
color: $color-white; color: $color-white;
@include mq(xl, min) {
height: 61px;
font-size: 28px;
line-height: 38px;
}
@include mq(lg, min) { @include mq(lg, min) {
&:hover { &:hover {
background: lighten($color-blue2, 10); background: lighten($color-blue2, 10);
@ -433,78 +767,135 @@
.summary-totalizers { .summary-totalizers {
margin: 0; margin: 0;
padding: 0; padding: 0;
width: 354px; width: 35.4%;
@include mq(md, max) {
width: 100%;
}
.summary-coupon { .summary-coupon {
margin: 0; margin: 0;
} }
.coupon-data {
display: block !important;
height: 14px;
}
.link-coupon-add { .link-coupon-add {
font-family: 'Tenor Sans'; font-family: 'Tenor Sans';
font-weight: 400; font-weight: 400;
font-size: 12px; font-size: 12px;
line-height: 14px; line-height: 14px;
color: #000000; color: $color-black;
@include mq(xl, min) {
font-size: 24px;
line-height: 28px;
}
} }
.coupon-form { .coupon-form {
.coupon-fieldset { .coupon-fieldset {
@include mq(md, max) {
padding: 0 16px;
}
.coupon-label { .coupon-label {
label {
font-family: 'Tenor Sans'; font-family: 'Tenor Sans';
font-weight: 400; font-weight: 400;
font-size: 12px; font-size: 12px;
line-height: 14px; line-height: 14px;
color: #7D7D7D; color: $color-gray2;
margin-bottom: 4px; margin-bottom: 4px;
text-align: start; text-align: start;
@include mq(xl, min) {
font-size: 24px;
line-height: 28px;
}
}
} }
.coupon-fields { .coupon-fields {
width: 100%; width: 100%;
margin: 0; margin: 0;
text-align: start;
i {
display: none;
}
span {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
@include mq(md, max) {
display: grid;
grid-template-columns: 7fr 1fr;
}
}
input { input {
width: 193px; width: 52.7%;
height: 36px; height: 36px;
background: #FFFFFF; background: $color-white;
border: 1px solid #E5E5E5; border: 1px solid $color-gray5;
border-radius: 5px; border-radius: 5px;
padding: 0; padding: 0;
margin-right: 15px;
margin-bottom: 20px;
padding-left: 11px; padding-left: 11px;
&::placeholder {
font-family: 'Tenor Sans'; font-family: 'Tenor Sans';
padding: 11px 0 11px 5px;
font-weight: 400; font-weight: 400;
font-size: 12px; font-size: 12px;
line-height: 14px; line-height: 14px;
color: #C4C4C4;
} @include mq(xl, min) {
height: 55px;
width: 54.5%;
font-size: 24px;
line-height: 28px;
} }
.loading-inline { @include mq(md, max) {
margin: 0px 20px 0 -40px; width: 100%;
top: -8px; margin-right: 5px;
}
&::placeholder {
padding: 11px 0 11px 5px;
color: $color-gray6;
}
} }
button { button {
font-family: 'Open Sans'; font-family: 'Open Sans';
background: #00C8FF; background: $color-blue2;
border-radius: 8px; border-radius: 8px;
margin-bottom: 22px;
height: 36px; height: 36px;
text-shadow: none; text-shadow: none;
border: 0; border: 0;
width: 133px; width: 36.7%;
font-size: 14px; font-size: 14px;
line-height: 19px; line-height: 19px;
letter-spacing: 0.05em; letter-spacing: 0.05em;
text-transform: uppercase; text-transform: uppercase;
color: #000000; color: $color-black;
outline: 0; outline: 0;
@include mq(md, max) {
margin-left: 20px;
width: 133px;
}
@include mq(xl, min) {
height: 55px;
font-size: 28px;
line-height: 38px;
}
} }
} }
} }
@ -512,14 +903,16 @@
.accordion-inner { .accordion-inner {
.table { .table {
width: 354px; margin-top: 6px;
margin-bottom: 17px;
} }
.totalizers-list { .totalizers-list {
width: 100%; width: 100%;
margin-top: 6px;
tr { tr {
border-bottom: 1px solid #E5E5E5; border-bottom: 1px solid $color-gray5;
width: 100%; width: 100%;
} }
@ -529,13 +922,25 @@
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
line-height: 16px; line-height: 16px;
color: #292929; color: $color-black-400;
@include mq(md, max) {
padding: 10px 16px;
}
@include mq(xl, min) {
font-size: 28px;
line-height: 33px;
}
&.info { &.info {
text-align: start; text-align: start;
} }
&.monetary { &.monetary {
width: 50%;
text-align: end; text-align: end;
} }
@ -549,8 +954,17 @@
font-weight: 700; font-weight: 700;
font-size: 18px; font-size: 18px;
line-height: 25px; line-height: 25px;
color: #292929; color: $color-black-400;
padding: 14px 0 17px; padding: 14px 0 0;
@include mq(xl, min) {
font-size: 36px;
line-height: 49px;
}
@include mq(md, max) {
padding: 14px 16px 0;
}
&.info { &.info {
text-align: start; text-align: start;
@ -572,11 +986,17 @@
display: flex; display: flex;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
width: 354px; width: 34.6%;
margin-bottom: 43px; margin-bottom: 43px;
@include mq(md, max) {
width: 100%;
padding: 16px 0;
}
.link-choose-more-products-wrapper { .link-choose-more-products-wrapper {
margin-bottom: 15px; margin-bottom: 15px;
height: 14px;
a { a {
font-family: 'Tenor Sans'; font-family: 'Tenor Sans';
@ -585,14 +1005,33 @@
font-size: 12px; font-size: 12px;
line-height: 14px; line-height: 14px;
text-align: center; text-align: center;
color: #000000; color: $color-black;
@include mq(xl, min) {
font-size: 24px;
line-height: 28px;
}
}
@include mq(xl, min) {
height: 28px;
} }
} }
.btn-place-order-wrapper { .btn-place-order-wrapper {
width: 100%;
@include mq(md, max) {
width: 97%;
}
@include mq(sm, max) {
width: 91.8%;
}
a { a {
background: #00C8FF; background: $color-blue2;
width: 352px; width: 100%;
border-radius: 8px; border-radius: 8px;
border: 0; border: 0;
font-weight: 700; font-weight: 700;
@ -601,8 +1040,17 @@
text-align: center; text-align: center;
letter-spacing: 0.05em; letter-spacing: 0.05em;
text-transform: uppercase; text-transform: uppercase;
color: #000000; color: $color-black;
padding: 12px 0; padding: 11px 0;
@include mq(xl, min) {
font-size: 28px;
line-height: 38px;
}
@include mq(md, max) {
width: 100%;
}
} }
} }

View File

@ -3,34 +3,18 @@
} }
.container-cart { .container-cart {
.active {
height: inherit;
}
.transactions-container,
@include mq(xs1, max) { .cart-vazio,
max-height: 64%; .empty-cart-message {
}
.transactions-container {
display: none !important; display: none !important;
} }
.cart-vazio {
display: none !important;
}
.cart-active,
.cart-template {
height: 100%;
}
.cart-template { .cart-template {
margin: 0; margin: 0;
} }
.empty-cart { .empty-cart {
&-content { &-content {
position: absolute; position: absolute;
top: 50%; top: 50%;

View File

@ -10,7 +10,8 @@ html {
body { body {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%; justify-content: space-between;
min-height: 100%;
padding-top: 0 !important; padding-top: 0 !important;
overflow: auto; overflow: auto;
@ -41,6 +42,11 @@ body {
.container-order-form, .container-order-form,
.container-cart { .container-cart {
width: 80%; width: 80%;
@include mq(md, max) {
width: 100%;
margin: 0;
}
} }
.body-cart-block { .body-cart-block {

View File

@ -27,11 +27,13 @@ $color-green: #4caf50;
/* Grid breakpoints */ /* Grid breakpoints */
$grid-breakpoints: ( $grid-breakpoints: (
xss: 295px,
xs: 320px, xs: 320px,
xs1: 345px, xs1: 345px,
sm: 376px, sm: 376px,
sm2: 456px, sm2: 456px,
sm3: 487px, sm3: 487px,
reset: 491px,
sm4: 600px, sm4: 600px,
sm5: 684px, sm5: 684px,
sm6: 730px, sm6: 730px,