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

Re: Requirement for Element Queries

From: Mikel Zorrilla <mzorrilla@vicomtech.org>
Date: Wed, 10 Jun 2015 14:13:14 +0200
Message-ID: <CAMjfpMAioooWkvytJ=W+WtT-h6Uqj9wfWzix635BRfdasd_2iw@mail.gmail.com>
To: Rob Brackett <rob@robbrackett.com>
Cc: public-respimg@w3.org
Dear Rob,

2015-06-09 17:26 GMT+02:00 Rob Brackett <rob@robbrackett.com>:

> Hi Mikel, are you referring to the code at
> https://github.com/ResponsiveImagesCG/cq-demos or
> https://github.com/ResponsiveImagesCG/element-query ? If so, I’m the
> original author of that code, so I can probably answer a few questions.
Yes, thanks!

> That was originally written as quick proof-of-concept project two years
> ago and, unfortunately, hasn’t had much work since. It updates all the
> element queries when the window/viewport resizes, as you noted. The intent
> was always to add DOM mutation observers to the mix as well; I just never
> got around to it. I *think* that would catch all situations that might
> cause an element to change size, but haven’t spent the time to really think
> through it deeply.
Yes, that's what we were pointing and what we are implementing. Analysing
this, is when we found your previous work in the field.

> Regardless, I believe the intent of Element/Container Queries is
> definitely to address the size of an element at any point in time,
> regardless of whether the window size is changing. Your case: “the
> container-based element queries should be applied, even if there is not a
> viewport change event” is exactly what’s intended! The fact that the demo
> code doesn’t do that is a shortcoming of the code, not a lack of intent for
> covering that use case :)

> As far as web components goes, I think that’s probably orthogonal to
> element/container queries. Web components are pretty great, but they don’t
> necessarily give you any special new functionality that matters to element
> queries (for example, they don’t tell you any more about size changes than
> mutation observes can). Tying element/container queries to custom elements
> would also mean tying the idea of a CSS-based query to particular markup,
> which I personally don’t think is good or necessary to make it work. I
> think you should be able to apply a query to an <h1> as easily as you would
> to a <media-scape-element>.
Agree. For our project, we are implementing it for Web Components, but it
is true that should be general.

> Does that cover what you were interested in?
Yes, thanks. I sent another reply with more details, but your answer
covered our point.

Best regards,

P.S: We will publish our development in some months, so we'll be able to
provide some examples for the discussion.

> -Rob
> On Jun 9, 2015, at 2:53 AM, Mikel Zorrilla <mzorrilla@vicomtech.org>
> wrote:
> Dear RICG.
> Please, find on this emails some comments to the "Use Cases and
> Requirements for Element Queries" draft document in
> https://responsiveimagescg.github.io/cq-usecases/ :
> We find this work very interesting since we completely agree on the need
> to "define styles within an individual module on the basis of the size of
> the module itself rather than the viewport" and "the need for a
> standardized method of allowing content to respond to its container’s
> dimensions".
> From the code in GitHub you provide, we find that you enable
> container-based element queries fired by a change on the viewport size. We
> think this could be extended to a change on the size of each element. We
> are working on the MediaScape (www.mediascapeproject.eu) project, where
> we are creating tools and libraries to create a multi-device media
> application based on Web technologies. For example, if we have an
> application with N elements, and a user is consuming that application from
> two devices at the same time (let's say a TV and a tablet), the TV will
> show only some of the N elements, and the tablet will show other elements.
> In this scenario, if the user turns off the TV, all the elements will be
> presented in the tablet. All the layout in the tablet will be resized,
> changing the size of each element. The container-based element queries
> should be applied, even if there is not a viewport change event.
> We are implementing this using Web Components as the elements. We find Web
> Components interesting, since they provide the containter/element concept.
> We would like to know if you have thought about extending your proposal in
> this direction, adding this as a new requirement for the element queries.
> Don't hesitate to contact us for more explanations.
> Best regards,
> Mikel Zorrilla Berasategi
> Senior Researcher & Project Manager
> Digital Television and Multimedia Services
> Vicomtech-IK4 - Visual Interaction Communication Technologies
> Mikeletegi Pasealekua, 57 - Parque Tecnológico
> 20009 Donostia - San Sebastián - Spain
> Tel: +[34] 943 30 92 30
> Fax: +[34] 943 30 93 93
> e-mail: mzorrilla@vicomtech.org
> www.vicomtech.org
> *** member of IK4 Research Alliance ****
> www.ik4.es
> *** member of GraphicsMedia.net ****
> www.graphicsmedia.net
> -----------------------------------------------------
> Vicomtech-IK4 is an ISO 9001:2000 certified institute
> -----------------------------------------------------
> Legal Notice - Privacy policy (
> http://www.vicomtech.org/en/proteccion-datos)
Received on Wednesday, 10 June 2015 12:13:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:06:17 UTC