css4j / css4j

CSS parser with Event and Object Model APIs, a DOM wrapper and a CSS-aware DOM implementation. Written in the Java™ language.

Home Page:https://css4j.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make `MediaQueryList.getMediaQuery(int)` publicly visible

carlosame opened this issue · comments

This library's implementations of MediaQueryList internally use a getMediaQuery(int) method to gain access to MediaQuery instances. The current MediaQueryList is a text-only interface (as specified by W3C), with the advantage of fine-grained object-model accesses being lost.

With getMediaQuery(int) being part of MediaQueryList, developers could obtain MediaQuery objects and use getCondition() to obtain the query conditionals. A new MediaQueryPredicate interface would help in determining the type of predicate and the name of the media type or feature involved.