Wednesday, September 18, 2013

Re: How to use different CSS/Code for different browsers/devices/os?

Thanks, I am just thinking if this can't be done "smarter", a bit old fashion when media queries didn't exist yet, using window.innerWidth, then select the correct Clientbundle depending on this value...... Just a thought.



On Wed, Sep 18, 2013 at 11:33 PM, Ashton Thomas <ashton@acrinta.com> wrote:
Here is one example of working around CSS3 limitation for media queries:



So this class encapsulates all the "ensureInjected" + hacking media queries

Just call MainAppResource.injectStyles() in onModuleLoad() or somewhere

Certainly not the best example, but an example nevertheless.



On Wednesday, September 18, 2013 5:24:26 PM UTC-4, Ed wrote:
thanks for your input.

@Steve: about this:
> 1 & 2: have a separate CSS resource for each media query, but without the query within it.  Instead, get the CSS string from the resource and 
> wrap the query around it yourself, and then inject the resulting string.

Can you please give some more insight? 
Let say you have 2 css files for MediaA and MediaB. 
How do you load these, wrap a media query around it, and inject it?

--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/6kNfG41TVBY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment