Harbs,

What did you learn about constants and in-lining regarding Closure Compiler?  
Could we put "px" in a variable/constant and have the option to replace it with 
"em"?

That said, are we sure that you can just switch to "em" and all other 
computations will "do the right thing"?

My first reaction is that Basic is basic and works in pixels and that adding 
other units can happen in other component sets and beads.

Of course, I could be wrong,
-Alex

On 1/14/19, 8:39 AM, "Harbs" <harbs.li...@gmail.com> wrote:

    There are tons of discussions on the web about the pros and cons of pixels 
vs em/rem. Some examples:[1][2][3][4][5]
    
    My takeaway is that there’s no one right answer. For predictable layout, 
pixels is safer, but for better reading with accessibility, em/rem might work 
better.
    
    Simply changing from pixels sounds like a very bad idea. For pixel perfect 
web apps pixels is probably the better choice. It might be a good idea to add 
the possibility of using em and/or rem, but adding more methods to UIBase is 
probably not the way to go about it.
    
    Maybe all the specifications of “px” should be changed to some utility 
function and a mixin could determine the actual value.
    
    My $0.02,
    Harbs
    
    
[1]https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbenfrain.com%2Fjust-use-pixels%2F&amp;data=02%7C01%7Caharui%40adobe.com%7Ca76a385efb904626fa7d08d67a3ed42b%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636830807600922851&amp;sdata=OqPiErny2yEEK3idQHYBr7Hgw3rlQY54v60oBdAC2RM%3D&amp;reserved=0
    
[2]https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fengageinteractive.co.uk%2Fblog%2Fem-vs-rem-vs-px&amp;data=02%7C01%7Caharui%40adobe.com%7Ca76a385efb904626fa7d08d67a3ed42b%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636830807600922851&amp;sdata=rOapw6TeaGalJWgCSarZL0m8E%2BkpMm4Mx1junGLvN5w%3D&amp;reserved=0
    
[3]https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fkyleschaeffer.com%2Fcss-font-size-em-vs-px-vs-pt-vs-percent&amp;data=02%7C01%7Caharui%40adobe.com%7Ca76a385efb904626fa7d08d67a3ed42b%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636830807600922851&amp;sdata=vn7BOgw2zEWeNJjwidFSMfJ1NQnnZHdiFgT3544lI18%3D&amp;reserved=0
    
[4]https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmedium.com%2F%40julienetienne%2Fpixels-are-dead-faa87cd8c8b9&amp;data=02%7C01%7Caharui%40adobe.com%7Ca76a385efb904626fa7d08d67a3ed42b%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636830807600922851&amp;sdata=hgA%2FCiAW3%2F4OC9Z8LZNO9nhbypQd0h8LfxfbuJIwUGI%3D&amp;reserved=0
    
[5]https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F609517%2Fwhy-em-instead-of-px&amp;data=02%7C01%7Caharui%40adobe.com%7Ca76a385efb904626fa7d08d67a3ed42b%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636830807600922851&amp;sdata=GSJOOTSYWvSqCW4isrC4EHro7Dbk6GMj4PFqi2D32S8%3D&amp;reserved=0
    
    > On Jan 14, 2019, at 5:04 PM, Carlos Rovira <carlosrov...@apache.org> 
wrote:
    > 
    > Hi Mark,
    > 
    > very good question. And I don't know what would be the best...
    > 
    > Hope others (Alex, Harbs, Piotr, etc...) could give some thoughts about
    > this since I'm not sure.
    > 
    > To put people on track; Mark states that using font size (only) browser
    > increase/decrease (notice that Firefox has a built-in control, but Chrome
    > needs a plugin), makes Apache Royale
    > fonts bigger or smaller while the rest of drawings are not affected. If we
    > change from PX to EM units, seems Mark gets right results.
    > 
    > So, the question is...how should we adapt Royale codebase to manage this?
    > 
    > Current width/height in UIBase, uses PX and is hardcoded...could we make
    > some decoupling or "plug" the right units as we want?, so instead of "px",
    > we have a constant or some modifier that could be configured in some part
    > (Maybe in Application), so we can set to EM instead to PX??
    > 
    > I think we need some config here, but that respect actual config, so 
people
    > can use actual PX or change to EM if they want. For example, I think Jewel
    > should change to use EM in a global way.
    > 
    > Thanks
    > 
    > 
    > 
    > El lun., 14 ene. 2019 a las 13:39, Mark Kessler (<
    > kesslerconsult...@gmail.com>) escribió:
    > 
    >> Carlos,
    >>    I can give it a shot when I'm at home.  However, what about the
    >> direct width/height assignments.  Should they do EM assignment too or
    >> should there be a new widthEM heightEM property added?
    >> 
    >> --
    > Carlos Rovira
    > 
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7Ca76a385efb904626fa7d08d67a3ed42b%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636830807600932856&amp;sdata=fbF68iMSN5QZnK3eMSUT%2FKybfkr5T8ZHQwfGOX7h848%3D&amp;reserved=0
    
    

Reply via email to