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 {
margin: 0 auto;
@include mq(md, max) {
width: 100%;
margin: 0;
}
h1 {
font-weight: 700;
font-size: 24px;
@ -15,12 +10,26 @@
color: $color-black-400;
margin: 16px 0;
@include mq(xl, min) {
font-size: 48px;
line-height: 65px;
}
@include mq(md, max) {
margin: 16px;
}
}
.cart-template {
@include mq(md, max) {
display: flex !important;
flex-direction: column;
}
}
.cart-template-holder {
width: 100%;
}
@ -33,6 +42,20 @@
&-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,
td {
text-align: start;
@ -46,6 +69,11 @@
line-height: 16px;
color: $color-black-400;
padding-bottom: 17px;
@include mq(xl, min) {
font-size: 28px;
line-height: 33px;
}
}
@include mq(md, max) {
@ -53,21 +81,49 @@
}
}
th,
td,
input,
a {
padding: 0;
}
.icon-question-sign {
display: none;
}
tr {
@include mq(md, max) {
position: relative;
}
.product-image {
width: 60px;
width: 4%;
min-width: 60px;
height: 60px;
padding-right: 16px;
img {
width: 100%;
max-width: 60px;
width: 4%;
min-width: 60px;
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 {
@ -79,14 +135,36 @@
font-size: 12px;
line-height: 14px;
color: $color-black;
}
@include mq(md, max) {
@include mq(xl, min) {
font-size: 24px;
line-height: 28px;
}
}
.brand,
.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;
line-height: 14px;
color: $color-gray8;
@include mq(xl, min) {
font-size: 24px;
line-height: 28px;
}
}
@include mq(md, max) {
display: none;
}
@include mq(xl, min) {
width: 111px;
padding-right: 176px;
}
}
td.product-price {
@ -120,36 +208,69 @@
text-transform: lowercase;
}
.list-price {
font-size: 12px;
line-height: 14px;
text-decoration-line: line-through;
color: $color-gray8;
@include mq(xl, min) {
font-size: 24px;
line-height: 28px;
}
}
.best-price {
font-size: 14px;
line-height: 16px;
color: #292929;
color: $color-black-400;
@include mq(xl, min) {
font-size: 28px;
line-height: 33px;
}
}
.price-details {
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 {
position: relative;
width: 99px;
width: 99px !important;
input {
box-sizing: border-box;
border: 1px solid $color-gray3;
width: 100%;
height: 34PX;
height: 34px;
border-radius: 8px;
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;
top: 50%;
transform: translateY(-50%);
font-size: 16px;
&::before {
width: 16px;
height: 16px;
color: $color-blue2;
}
}
}
@include mq(xl, min) {
font-size: 32px;
&::before {
width: 32px;
height: 32px;
}
}
}
.icon-plus-sign {
right: 11px;
@ -176,12 +305,30 @@
left: 11px;
}
th,
td,
input,
@include mq(md, max) {
position: absolute;
left: 92px;
bottom: 0;
margin: 0 !important;
a {
padding: 0;
position: initial;
}
input {
width: 100% !important;
}
}
@include mq(reset, max) {
left: 60px;
}
@include mq(xl, min) {
width: 135px !important;
}
}
}
.quantity-price {
@ -194,21 +341,51 @@
font-weight: 700;
font-size: 14px;
line-height: 19px;
color: #292929;
color: $color-black-400;
@include mq(xl, min) {
font-size: 28px;
line-height: 38px;
}
}
@include mq(md, max) {
display: none;
}
@include mq(xl, min) {
width: 154px;
padding-left: 175px;
padding-right: 28px;
}
}
.item-remove {
width: 10px;
width: 10px !important;
a {
font-family: initial;
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 {
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 {
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 {
font-weight: 400;
font-size: 24px;
line-height: 33px;
margin-bottom: 11px;
color: $color-black;
@include mq(sm, max) {
margin-left: 16px;
}
@include mq(xl, min) {
font-size: 48px;
line-height: 65px;
}
}
.srp-description {
@ -238,11 +449,31 @@
margin: 0;
margin-bottom: 10px;
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 {
margin: 0;
width: 280px;
width: 100%;
@include mq(md, max) {
padding: 16px;
}
.shp-open-options {
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 {
@ -286,19 +527,38 @@
width: 100%;
background: $color-white;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
height: 36px;
border-radius: 100px;
font-weight: 400;
font-size: 14px;
line-height: 19px;
text-transform: uppercase;
@include mq(xl, min) {
height: 57px;
}
}
&__delivery {
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 {
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 {
@ -320,30 +580,67 @@
display: none;
}
.srp-postal-code__form {
width: 100%;
}
.vtex-shipping-preview-0-x-postalCodeForgotten {
position: absolute;
margin: 0;
width: 100%;
.ship-postalCode {
width: 172px;
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 {
font-size: 12px;
line-height: 16px;
color: $color-black;
margin-bottom: 2px;
@include mq(xl, min) {
font-size: 24px;
line-height: 33px;
}
}
.input-small {
width: 172px;
width: 100%;
height: 36px;
background: $color-white;
border: 1px solid $color-gray6;
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 {
margin-top: 4px;
a {
font-family: 'Tenor Sans';
@ -353,11 +650,22 @@
text-decoration-line: underline;
color: $color-black;
@include mq(xl, min) {
font-size: 20px;
line-height: 23px;
}
}
}
.help {
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-size: 14px;
line-height: 19px;
text-align: center;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
letter-spacing: 0.05em;
text-transform: uppercase;
color: $color-white;
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) {
&:hover {
background: lighten($color-blue2, 10);
@ -392,6 +711,15 @@
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;
color: $color-white;
@include mq(xl, min) {
height: 61px;
font-size: 28px;
line-height: 38px;
}
@include mq(lg, min) {
&:hover {
background: lighten($color-blue2, 10);
@ -433,78 +767,135 @@
.summary-totalizers {
margin: 0;
padding: 0;
width: 354px;
width: 35.4%;
@include mq(md, max) {
width: 100%;
}
.summary-coupon {
margin: 0;
}
.coupon-data {
display: block !important;
height: 14px;
}
.link-coupon-add {
font-family: 'Tenor Sans';
font-weight: 400;
font-size: 12px;
line-height: 14px;
color: #000000;
color: $color-black;
@include mq(xl, min) {
font-size: 24px;
line-height: 28px;
}
}
.coupon-form {
.coupon-fieldset {
@include mq(md, max) {
padding: 0 16px;
}
.coupon-label {
label {
font-family: 'Tenor Sans';
font-weight: 400;
font-size: 12px;
line-height: 14px;
color: #7D7D7D;
color: $color-gray2;
margin-bottom: 4px;
text-align: start;
@include mq(xl, min) {
font-size: 24px;
line-height: 28px;
}
}
}
.coupon-fields {
width: 100%;
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 {
width: 193px;
width: 52.7%;
height: 36px;
background: #FFFFFF;
border: 1px solid #E5E5E5;
background: $color-white;
border: 1px solid $color-gray5;
border-radius: 5px;
padding: 0;
margin-right: 15px;
margin-bottom: 20px;
padding-left: 11px;
&::placeholder {
font-family: 'Tenor Sans';
padding: 11px 0 11px 5px;
font-weight: 400;
font-size: 12px;
line-height: 14px;
color: #C4C4C4;
}
@include mq(xl, min) {
height: 55px;
width: 54.5%;
font-size: 24px;
line-height: 28px;
}
.loading-inline {
margin: 0px 20px 0 -40px;
top: -8px;
@include mq(md, max) {
width: 100%;
margin-right: 5px;
}
&::placeholder {
padding: 11px 0 11px 5px;
color: $color-gray6;
}
}
button {
font-family: 'Open Sans';
background: #00C8FF;
background: $color-blue2;
border-radius: 8px;
margin-bottom: 22px;
height: 36px;
text-shadow: none;
border: 0;
width: 133px;
width: 36.7%;
font-size: 14px;
line-height: 19px;
letter-spacing: 0.05em;
text-transform: uppercase;
color: #000000;
color: $color-black;
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 {
.table {
width: 354px;
margin-top: 6px;
margin-bottom: 17px;
}
.totalizers-list {
width: 100%;
margin-top: 6px;
tr {
border-bottom: 1px solid #E5E5E5;
border-bottom: 1px solid $color-gray5;
width: 100%;
}
@ -529,13 +922,25 @@
font-weight: 400;
font-size: 14px;
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 {
text-align: start;
}
&.monetary {
width: 50%;
text-align: end;
}
@ -549,8 +954,17 @@
font-weight: 700;
font-size: 18px;
line-height: 25px;
color: #292929;
padding: 14px 0 17px;
color: $color-black-400;
padding: 14px 0 0;
@include mq(xl, min) {
font-size: 36px;
line-height: 49px;
}
@include mq(md, max) {
padding: 14px 16px 0;
}
&.info {
text-align: start;
@ -572,11 +986,17 @@
display: flex;
align-items: center;
flex-direction: column;
width: 354px;
width: 34.6%;
margin-bottom: 43px;
@include mq(md, max) {
width: 100%;
padding: 16px 0;
}
.link-choose-more-products-wrapper {
margin-bottom: 15px;
height: 14px;
a {
font-family: 'Tenor Sans';
@ -585,14 +1005,33 @@
font-size: 12px;
line-height: 14px;
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 {
width: 100%;
@include mq(md, max) {
width: 97%;
}
@include mq(sm, max) {
width: 91.8%;
}
a {
background: #00C8FF;
width: 352px;
background: $color-blue2;
width: 100%;
border-radius: 8px;
border: 0;
font-weight: 700;
@ -601,8 +1040,17 @@
text-align: center;
letter-spacing: 0.05em;
text-transform: uppercase;
color: #000000;
padding: 12px 0;
color: $color-black;
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 {
.active {
height: inherit;
}
@include mq(xs1, max) {
max-height: 64%;
}
.transactions-container {
.transactions-container,
.cart-vazio,
.empty-cart-message {
display: none !important;
}
.cart-vazio {
display: none !important;
}
.cart-active,
.cart-template {
height: 100%;
}
.cart-template {
margin: 0;
}
.empty-cart {
&-content {
position: absolute;
top: 50%;

View File

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

View File

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