W3C home > Mailing lists > Public > www-style@w3.org > August 2014

Re: [css-device-adapt] Target node for application of the style properties

From: Dylan Barrell <dylan.barrell@deque.com>
Date: Mon, 11 Aug 2014 01:13:39 +0000
Message-ID: <CAKGs1QYo3ygZQ8TmERQ56X_cY9A32bk=oYvcwBfRwuC+sEXekg@mail.gmail.com> (sfid-20140811_011347_347490_8305FC92)
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
ok, now that we have determined that the CSSOM is not available for
resources that are cross domain, I would like to formally request that a
JavaScript API be added that can get the currently applied viewport
properties regardless of whether these have been set in a style sheet or in
a <meta> tag.

--Dylan



On Wed, Jul 23, 2014 at 2:04 PM, Tab Atkins Jr. <jackalmage@gmail.com>
wrote:

> [sorry for the delay; our moderation queue was just cleared]
>
> On Wed, Jun 4, 2014 at 6:02 AM, Dylan Barrell <dylan.barrell@deque.com>
> wrote:
> > I have read through the draft at
> http://dev.w3.org/csswg/css-device-adapt/
> > and I cannot find any specification of which HTML node the style
> properties
> > will be applied against or how they can be read and set from JavaScript.
> >
> > Is this content still pending?
>
> The properties in a @viewport rule don't apply to any element, they
> apply to the viewport itself.
>
> They can be read from JS using the normal CSSOM methods - get the
> stylesheet object, iterate the rules until you find the @viewport one,
> then get its .style property.  This isn't particularly convenient (the
> CSSOM isn't very well-designed), but it'll do.
>
> ~TJ
>



-- 
Download FireEyes Free: http://www.deque.com/products/worldspace-fireeyes

Great minds discuss ideas
Average minds discuss events
Small minds discuss people
Received on Tuesday, 12 August 2014 14:46:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 12 August 2014 14:46:55 UTC