faet(style) redirada da tag margin

This commit is contained in:
Ueber James Santos 2022-12-16 21:43:29 -03:00
parent 86c11efd2e
commit f065ee6ee7
2 changed files with 36 additions and 16 deletions

View File

@ -4,16 +4,15 @@ import { waitElement } from "m3-utils";
export default class Footer {
constructor() {
this.init();
this.mostraFooter();
this.addCarrossel();
}
async init() {
await this.selectors();
this.onUpdate();
this.mostraFooter();
this.addCarrossel();
this.onUpdate();
this.titles();
}
@ -25,6 +24,7 @@ export default class Footer {
this.footerStamps = await waitElement(".footerCheckout__stamps");
this.footerDevelopedBy = await waitElement(".footerCheckout__developedBy");
this.checkoutVazio = await waitElement(".empty-cart-content");
this.cartTitulo = await waitElement("#cart-title");
}
onUpdate() {
@ -34,21 +34,29 @@ export default class Footer {
let target = this.checkoutVazio;
let config = { childList: true, attributes: true };
let observer = new MutationObserver((mutations) => {
mutations.forEach(function (mutation) {
if(mutation.target.style.display === "none"){
console.log("none")
}else{
console.log("block")
mutations.forEach((mutation)=> {
const statu = mutation.target.attributes.style.nodeValue;
if(statu === 'display:none;'){
this.cartTitulo.classList.remove('desativaSlick')
}else if(statu === 'display:block;'){
this.cartTitulo.classList.add('desativaSlick')
}
console.log(mutation.type);
// if(mutation.target.style.display === "none"){
// console.log("none")
// }else{
// console.log("block")
// }
// console.log(mutation.type);
});
});
observer.observe(target, config);
}
mostraFooter() {
let pratileira = this.footerPratileira;
pratileira.innerHTML = `

View File

@ -105,7 +105,7 @@
.accordion-inner {
padding: 0;
margin: 0 0 0 50px;
margin: 0 0 0 5px;
}
}
@ -124,7 +124,9 @@
.summary-totalizers {
td.info {
width: 100%;
padding: 50px 5px 0 0;
}
}
#payment-data-submit {
@ -331,7 +333,7 @@
input {
background-color: $color-white;
border: 1px solid $color-gray3;
border: 1px solid transparent;
border-radius: 0;
border-width: 0 1px;
display: block;
@ -354,13 +356,15 @@
display: block;
font-weight: 500;
padding: 1px 12px;
}
}
.icon-minus-sign {
&:before {
// content: "-";
font-size: 16px;
font-size: 20px;
color: $color-finalizar;
}
}
@ -368,7 +372,8 @@
.icon-plus-sign {
&:before {
// content: "+";
font-size: 14px;
font-size: 20px;
color: $color-finalizar;
}
}
@ -873,7 +878,8 @@
font-style: normal;
font-weight: normal;
font-size: 14px;
padding: 50px 17px 0 0;
border-bottom: 1px solid #f4f4f4;
// padding: 50px 5px 0 0;
@media (max-width: 1024px) {
padding: 0 17px 10px 16px;
@ -992,6 +998,10 @@
}
}
.coupon-fieldset{
padding-top: 40px;
}
.item-remove{
display: block;
@ -1022,3 +1032,5 @@
.vtex-shipping-preview-0-x-pc .ship-country {
display: none;
}
.pull-left{display: none;}