RE: Element queries: The viewport element

Hi Lucas,

The <viewport> element is something totally fictionnal at the moment, so it's hard to predict what it will do or how it will achieve that result at this point.

That being said, your question could tentatively be answered in a positive way, because iframes can have a "seamless" attribut allowing to achieve the result you point out.

The issue with iframes is that seamless doesn't prevent height-related media queries and units, which is a problem. We could avoid this pitfall with the viewport element, if we specify it that way.

Best regards,
François



From: lucas@wiener.se
Date: Mon, 23 Mar 2015 10:38:37 +0000
To: public-respimg@w3.org
Subject: Element queries: The viewport element

Hi,
I'm investigating element queries for my master's thesis.

It is my understanding that element queries will be restricted to something like "container queries" so that all queries can only target the nearest "viewport" ancestor element. This to avoid a lot of problems (such as decreased parallelism and cyclic rules).

>From what I've read, this viewport element will be a new HTML element very similar to an iframe, but without the new browsing context. So the viewport element would have it's own viewport (of course) which the children would write queries on (much like the window viewport and media queries). For this to work, the viewport style cannot depend on it's children. This will make it behave much like an iframe style-wise (no auto-height or similar content flexibility).

My question:
Would it be possible to let the viewport element style properties depend on it's children for the properties that are not present in any child element query? Assume that the typical use case for element queries is to write conditional CSS depending on the width of the viewport element. If no element queries target the height of the viewport, could the viewport then be allowed to behave like a normal block-element and have it's height be computed by it's children?

I think by allowing this, working with viewport elements would be much more pleasant since they behave as "normal" div elements with the addition that one can write local element queries inside it.
Of course, for more advanced element queries that targets both the height and width, the viewport can no longer depend on it's children.

Kind regards
Lucas Wiener 		 	   		  

Received on Saturday, 4 April 2015 14:17:18 UTC