RE: Media feature based on parent width instead of viewport/device width

± I found this thread while looking to see if an idea I wanted to propose was
± already in the works. This proposal is very close, so I'm tacking my
± suggestions onto it, as I think it addresses the problem of loops in the layout
± (infinite or otherwise).

Sorry for late response. As you probably guessed, this solution isn't acceptable either, and that's why you didn't get any response to this message until now. Since I've got a few free time today, I'm going to write down the reasons why this solution doesn't do the trick.

The solution won't work because it makes the assumption that the layout of previous element has been computed already when the matching of CSS rules is performed on an element. In reality, the matching phase is performed completely upfront, and the layout isn't done on an element-per-element basis but one time per rendering, when the matching and cascading phases are done.

Changing this is not possible for many reason, including performance ones, but also because it would make it impossible to perform the matching, the cascading and the page layout in parallel without a lot of synchronization code, effectively making it impracticable.

Don't hesitate to ask for further details if needed,
François

Received on Saturday, 9 February 2013 14:39:03 UTC