Although this might cause shrieks of horror, I've come to love using CSS over the past couple of years. I still use Object Pascal for building desktop UIs (with Nim for number-crunching), but with a twist - I'm gradually migrating the components I use to HTML/CSS-based versions using this:
<https://delphihtmlcomponents.com/> I even have an experimental desktop app that's built entirely in HTML/CSS using these components, but there are still gaps in their functionality that will hopefully be addressed this year. HTML/CSS-based desktop apps are often based on Electron, but that's a beast. There's also Sciter, but it doesn't handle CSS Flex in a standard way. A significant advantage of this approach is that I'm building a set of components that can be used on the desktop and in web apps using the pas2js compiler - something that could obviously also be achieved in Nim using the JS backend. Another part of the picture is the use of the MVVM pattern. In web apps I integrate KnockoutJS and on the desktop I use an Object Pascal equivalent: <https://github.com/SigmaSciences/KnockoutOP> The result of all this is that I have almost zero code in my HTML/CSS views and, importantly, can hand off UI design to a CSS developer - no need for them to know any Object Pascal. I can also share vast amounts of code across desktop and web. In fact, with the new Figma dev mode I don't even need a CSS developer.... This post isn't meant to promote Object Pascal - but there are some nice ideas that could possibly be migrated to Nim. Although I admit the lack of an HTML/CSS component is a significant hurdle. However, I've never seen the point of, e.g., Flutter, when we have something like CSS available. Cheers, Bob