W3C home > Mailing lists > Public > public-respimg@w3.org > April 2015

Re: Element queries: The viewport element

From: <steve@steveclaflin.com>
Date: Wed, 29 Apr 2015 10:52:26 -0500
To: Lucas Wiener <lucas@wiener.se>
Cc: François REMY <francois.remy.dev@outlook.com>, public-respimg@w3.org
Message-ID: <ef73f2175f870173577879caa40eee04@steveclaflin.com>
I'm not sure if it is "really early".  Isn't this the place where those 
discussions take place?

Under that theory, I think it would be disappointing if we needed 
another tag, like viewport, to be able to have element queries.  
Offhand, it would seem that an element that has the role of an 
offsetParent would have most of what would be necessary to be queried 
for its dimensions, especially its width (although I must admit that 
I've never understood why floating elements aren't considered 
offsetParents).

Failing some way that an element just naturally becomes a queryable 
container, it seems to me that an attribute such as "role" or "rel" 
would be preferable to creating another new tag.

Regards,

Steve Claflin

On 2015-04-06 09:01, Lucas Wiener wrote:
> Hi François,
> 
> Thank you for your response.
> 
> Yes I understand this is really early to discuss syntax and
> specifications, but I'm trying to theorize about element queries as
> much as possible for my study :)
> 
> Interesting, I did not know about the seamless iframe. Too bad it
> seems like all browsers have pulled the support for them.
> 
> I guess that I got the answer to my question - that it is possible.
> 
> Thank you
> 
> Kind regards,
> Lucas Wiener
> 
> lör 4 apr. 2015 kl 16:16 skrev François REMY
> <francois.remy.dev@outlook.com>:
> 
>> 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 Wednesday, 29 April 2015 15:41:24 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 29 April 2015 15:41:25 UTC