Improved/simplified CSS media handling

pull/213/head
M66B 1 year ago
parent 9f2cabb122
commit 7a8efad076

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

Loading…
Cancel
Save