Reputation: 104
When I try in stylish(chrome)
*{
background : black !important
}
all the background images are overridden,
I was wondering if there is a way to restore the background images or keep them intact.
Thanks
Upvotes: 1
Views: 693
Reputation: 12959
Use
background-color
instead ofbackground
*:not([background-image]) {
background-color:black!important;
}
div {
width: 200px;
height: 200px;
background-color: red;
}
.bg {
background-image: url('https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTqy1uodNithL90ttojytSP2imO4RC1y3qlm_ebZdRmNWh_8juV9Q');
}
*:not([background-image]) {
background-color:black!important;
}
<div>I am Test</div>
<div class="bg">I am Test2</div>
Upvotes: 2