flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maurice Amsellem <maurice.amsel...@systar.com>
Subject RE: Advice needed on FLEX-33994
Date Wed, 19 Mar 2014 15:52:48 GMT
>What do folks do in the HTML/JS/CSS world?  
>From what I read on the web, they use media queries, with a combination of width/height
( type=handheld is not used, as it's not well supported).

For Flex JS, you could rely entirely on the browser's media query parser, so that would be
easy. right ?

DPI buckets is something special to Android java programming
Android also uses size buckets and resolution buckets.

I have added it because Justin suggested it and we already have the DPI-buckets calculation
(which HTML CSS does not have) , so it was easy.

So Flex implementation is not totally compliant with W3C regarding media queries, but it wasn't
already, so no big change.


-----Message d'origine-----
De : Alex Harui [mailto:aharui@adobe.com] 
Envoyé : mercredi 19 mars 2014 16:23
À : dev@flex.apache.org
Objet : Re: Advice needed on FLEX-33994

What do folks do in the HTML/JS/CSS world?  For FlexJS I hope to not rely on custom media
queries any more than the HTML/JS/CSS folks do.  It might be nice if the SDK did something
similar although the DPI buckets can be a factor.  In theory FlexJS won't need buckets because
you can compute the buckets from media query if you want to use buckets and can avoid all
of that if you don't.


On 3/19/14 7:48 AM, "Maurice Amsellem" <maurice.amsellem@systar.com> wrote:

>I agree it's mainly for mobile.
>>see if you can put in a flag so folks can get back to the old behavior:
>I propose the new "device-diagonal" selector, which doesn't change with 
>the orientation.
>So the test could be:
>- if device-width or device-height is used, update styles on 
>orientation change
>- if device-diagonal is used, don't update styles on orientation
>- if no device-xxx is used, don't update styles on orientation change.
>-----Message d'origine-----
>De : Alex Harui [mailto:aharui@adobe.com] Envoyé : mercredi 19 mars 
>2014 15:40 À : dev@flex.apache.org Objet : Re: Advice needed on 
>IIRC, pixel density is not reported accurately on the desktop, so 
>computing inches and cms will have a certain amount of inaccuracy.
>That said, see if you can put in a flag so folks can get back to the 
>old behavior if they find this one too slow, and go for it.  Large 
>desktop UI's with tons of widgets could be slow, but the main point is 
>for mobile where there are probably fewer widgets at a time.
>On 3/19/14 7:32 AM, "Maurice Amsellem" <maurice.amsellem@systar.com>
>>I am preparing for https://issues.apache.org/jira/browse/FLEX-33994  ( 
>>media size CSS ) and have a few interrogations:
>>1) Specs: this is how I intend to implement the new media selectors:
>>@media selectors:
>>device-width, device-height
>>Supports the following units:
>>(no unit), px, pt, in, cm, dp
>>- no unit / px => physical pixels
>>- pt => pixels-equivalent at 72 ppi
>>- cm & in => self explanatory
>>- dp => pixels-equivalent at 160 ppi (bucket ppi)
>>If I understand correctly the explanations from Justin, "dp" uses the 
>>bucket DPIs, not the real ppis.
>>So I will use the real device ppi to compute pt, inch and cm pixel 
>>equivalent and bucket-ppi to compute the pixel equivalent for "dp" unit.
>>2) Supporting resize / orientation change:
>>Ideally, when resizing the SWF (on desktop) or changing the device 
>>orientation / going full screen on mobile, the media queries should be 
>>re-evaluated, like in HTML, with potentially different results.
>>I am not an expert of the Style Management in Flex, but I am worried 
>>that this would be very slow , especially on mobile, and may even 
>>break the application.
>>Since the initial need was to be able to distinguish mobile / tablet / 
>>screen / tv, and there are other means of handling orientation change 
>>in the  UI , I thought it could be acceptable to compute width / 
>>height independently of the actual device orientation (eg. always in 
>>portrait mode).
>>Another possibility , which is not W3C, is to provide new 
>>"device-diagonal" measure, which is a common measurement for display 
>>sizes Eg.
>>@media (max-device-diagonal: 5in) {
>>  /* phone css*/
>>@media (min-device-diagonal: 5in) and (max-device-diagonal: 11in) {
>>  /* tablet css*/
>>@media (min-device-diagonal: 11in) and (max-device-diagonal: 24in) {
>>  /* screen*/
>>@media (min-device-diagonal: 24in) {
>>  /* TV*/
>>What do you think?

View raw message