View Single Post
Old 07-11-2016, 09:33 PM   #3
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
ADE doesn't barf on all media queries; it has a very limited hack that explicitly ignores a few of the most basic queries, but things like "not" trip it up. And many of the other "at rules" explode in various ways, including @page.

More to the point, ADE does not follow the CSS specification's rules for how to handle unknown declarations; the spec makes it clear how to parse both at rules and normal rules, and how to find the end of that declaration. The spec also makes it clear that unknown rules should be ignored. ADE's parser does neither.

IMO, Adobe needs to grab one of the many open source CSS parser implementations and use it, rather than reimplementing the wheel (badly).

The way I solve this is to treat ADE as the baseline style, and put all my @media and @page queries into a separate CSS file that modifies the styles from there. I also put a few nonstandard styles that fix rendering on specific nonstandard rendering engines but cause ADE to barf. ADE, of course, barfs on that second CSS stylesheet and ignores it, but it doesn't matter, because none of those styles are intended to apply to ADE.

Last edited by dgatwood; 07-11-2016 at 09:42 PM.
dgatwood is offline   Reply With Quote