Improved/simplified CSS media handling

This commit is contained in:
M66B 2023-08-26 17:19:03 +02:00
parent 9f2cabb122
commit 7a8efad076
1 changed files with 2 additions and 3 deletions

View File

@ -1825,9 +1825,8 @@ public class HtmlHelper {
if (media instanceof MediaListImpl) {
MediaListImpl _media = (MediaListImpl) media;
for (int i = 0; i < _media.getLength(); i++) {
String query = _media.mediaQuery(i).getCssText(null);
if ("all".equals(query) ||
"screen".equals(query) || "only screen".equals(query))
String type = _media.mediaQuery(i).getMedia();
if ("all".equals(type) || "screen".equals(type) || _media.mediaQuery(i).isNot())
return true;
}
} else