I want to change the background of the body tag for each component of my page, but if I declare the background the each component css file it causes conflict.
Component 1 css file:
body {
background: url('../../assets/img/Forma_1.svg') left top no-repeat,
url('../../assets/img/Forma_2.svg') right 30% no-repeat, var(--blue);
background-size: 295px, 64px;
}
@media screen and (min-width: 768px) {
body {
background: url('../../assets/img/Forma_1.svg') left top no-repeat,
url('../../assets/img/Forma_2.svg') right center no-repeat, var(--blue);
background-size: 395px, 104px;
}
}
Component 2 css file: (the styles of this file apply to all the pages because of the !important, but if I take out the styles of the first file apply on the Component 2)
body {
background: url('../../assets/img/Forma_1.svg') left top no-repeat,
url('../../assets/img/Forma_2_flip.svg') left center no-repeat, #fff !important;
background-size: 295px, 64px !important;
}
@media screen and (min-width: 768px) {
body {
background: url('../../assets/img/Forma_1.svg') left top no-repeat,
url('../../assets/img/Forma_2.svg') right center no-repeat,
url('../../assets/img/Patas.png') right top no-repeat, #fff !important;
background-size: 395px, 104px, 147px !important;
}
}