csso icon indicating copy to clipboard operation
csso copied to clipboard

Background image is destroyed

Open ygoe opened this issue 7 years ago • 0 comments

There's an issue with background images. Here's a part of the CSS code I write:

.banner1
{
	background: #101018 url(1.jpg) 50% 50% no-repeat;
	background-size: cover;
	height: 350px;
	max-height: 25vw;
	min-height: 200px;
}
.banner2
{
	background: #101018 url(2.jpg) 50% 60% no-repeat;
	background-size: cover;
	height: 350px;
	max-height: 25vw;
	min-height: 200px;
}

One page uses the banner1 and another page uses the banner2. But the following properties are ignored in both: background-repeat, background-size, min-height, and others. Firefox F12 panel says they are overridden by another property.

At one point I found the following CSS selector in the minified file: .banner1, .banner2. This is never said in the source file. These two selectors should not be defined together. Something seems to be wrong in csso. Without csso, the CSS looks roughly as I wrote it and everything works fine.

Interestingly, it also depends on the value of min-height. Exactly 200px often breaks the layout whereas any other value seems to be fine. Another weird behaviour of csso.

I'm not sure whether this has been reported before as too many of the issues reported here are not in English.

ygoe avatar Feb 01 '19 16:02 ygoe