[[!meta title="Css media queries"]] [[!meta author="Kyllikki"]] [[!meta date="2015-04-03T13:09:32Z"]] [[!toc]] irc discussion ============== **jmb** if this is in libcss, then you probably only need to alter parseMediaList (and friends) **kyllikki** oh thats a thought, this should probably be an interface in libcss rather than open coded in the browser **jmb** seems reasonable, given libcss needs it too **kyllikki** I worked my way to where it was currently done and it extracts the entry from the link and does string messing on it **jmb** yeah; that's hideous, and should die **kyllikki** ok so how ought we to do it? **jmb** first, we need to change how libcss represents media. currently, it's a bitfield. which clearly doesn't work for media queries. so, that needs to be an object, instead. which probably isn't much work to change. then, in libcss' parser, parseMediaList will need to change to understand the new media query grammar **kyllikki** ok, i think i know what you mean. thats just altering the internal libcss representation? **jmb** mostly. And then, finally, we need to expose an api to allow a client to parse an arbitrary string as if it were a media query list. that should return the new media object. that's needed, because of ` `` **kyllikki** right, which is all we currently support right? **jmb** libcss supports @media rules.