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://benfrain.com/just-use-pixels/ [2]https://engageinteractive.co.uk/blog/em-vs-rem-vs-px [3]https://kyleschaeffer.com/css-font-size-em-vs-px-vs-pt-vs-percent [4]https://medium.com/@julienetienne/pixels-are-dead-faa87cd8c8b9 [5]https://stackoverflow.com/questions/609517/why-em-instead-of-px > 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 > http://about.me/carlosrovira