You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.test::after {
content:url("./image.jpg");
content:url("./image.jpg") /"Some alt text";
}
The second declaration in the block is a valid value for the content CSS property, at least according to the CSS Content Level 3 specification (see here in MDN), but it is only supported in Chromium browsers, and not in Firefox or Safari.
Declaring the content property twice in the same block achieves backwards compatibility for browsers that don't support the newer syntax for that property, since a declaration which doesn't have correct syntax for the given property will be ignored. Therefore, Firefox and Safari will use url("./image.png") as the value of the content property, and Chromium browsers will use url("./image.png") / "Some alt text".
css-minify, however, stores the CSS declarations in a block as a map from CSS properties to a single value, which means only the latter value is stored in the map. Therefore, even with level 0, the result of minification is:
.test:after {content:url("./image.jpg") /"Some alt text"}
which behaves differently from the original CSS.
The text was updated successfully, but these errors were encountered:
Take the following CSS code:
The second declaration in the block is a valid value for the
content
CSS property, at least according to the CSS Content Level 3 specification (see here in MDN), but it is only supported in Chromium browsers, and not in Firefox or Safari.Declaring the
content
property twice in the same block achieves backwards compatibility for browsers that don't support the newer syntax for that property, since a declaration which doesn't have correct syntax for the given property will be ignored. Therefore, Firefox and Safari will useurl("./image.png")
as the value of thecontent
property, and Chromium browsers will useurl("./image.png") / "Some alt text"
.css-minify
, however, stores the CSS declarations in a block as a map from CSS properties to a single value, which means only the latter value is stored in the map. Therefore, even with level 0, the result of minification is:which behaves differently from the original CSS.
The text was updated successfully, but these errors were encountered: