4 ms·
> It would simplify things dramatically if we didn't need to care about stuff like responsive design or resizable text. ...sincere question, have you ever actu
by filleduchaos 6y ago
> It would simplify things dramatically if we didn't need to care about stuff like responsive design or resizable text.
...sincere question, have you ever actually used a native UI SDK?
- danShumway 6y agoYes. Now, I have not used Flutter in specific, but from what I can see from its documentation, it doesn't support `em` units, so I can't base widths off of the current font size. The recommendations I'm seeing online for doing responsive design are to do device queries for the layout or to do percentage-based box sizes. Again, I haven't used Flutter, so maybe it's better than the online tutorials I'm looking at give the impression of. But I'm having a real hard time imagining how I would recreate the functionality of CSS Grids or Flexbox using that kind of system. Some native frameworks do a much better job. I think GTK is pretty good (although, suspiciously, GTK has ended up copying a lot of CSS features, so take from that what you will). But even there, it's worth noting that the developers behind most of the apps I'm familiar with aren't really taking advantage of modern GTK features. I have an Arch install with the desktop split between a 4K monitor and a normal 1920x1080. I also maintain a Manjaro install on an HDPI Surface laptop with an odd aspect ratio. By and large, the native apps I use are mostly terrible at handling these scenarios. In comparison, most websites I visit are handling weird aspect ratios and 2x scaling pretty well. I'll also give a shoutout to Mac, which I'm not familiar with a developer platform because heck that, but I assume has decent UI frameworks because more of the apps I use on Mac actually handle resizing nicely. In any case, the point I was making was not just that the web is uniquely good at responsive design. Responsive design is one of the easiest problems that the web is solving. Now show me a native toolkit that can match the web at allowing users to override styles or block/replace UI elements. The significant problem that the web is solving is forcing state to be represented in an XML tree. That's the important part, responsive design is just one of the advantages that come from that.
- dragonwriter 6y ago> Now, I have not used Flutter in specific, but from what I can see from its documentation, it doesn't support `em` units, so I can't base widths off of the current font size Can't you just use the fontSize property and multiply it by whatever number you were going to use for ems (or maybe multiply fontSize by textScaleFactor first, depending on how rigorously you want to lock to text.)
- danShumway 6y agoIs the `fontSize` property in Flutter user-customizable? If so, yes that would work fine. But it would be a weird argument to say that Flutter represents an evolution over CSS if right from the start I'm being forced to manually reinvent a core UI primitive.
- maxharris 6y agoWhy not just learn Flutter or SwiftUI? These systems are only going to continue to get more popular through the decade.