Re:Show HN: Nue – Apps lighter than a React button
by troupo on Thursday April 03, 2025 @04:46AM
(#43566743)
> What I described as separation is a a decomposition into modules which are linked together through a contract.
wat
> Without cascading, we would probably have components and inheritance.
indeed. That is why I wrote what I wrote about BEM and CSS Scoping
> They're not required, but they make it easier to build the UI as it almost always have a tree structure.
Those systems have support, but there's rarely, if ever, a true separation of styling and structure. There's a reason for that, illustrated here: https://x.com/simonswiss/status/1664736786671869952
The separation between CSS and HTML is a good idea in a very theoretical abstract academic sense. It never ever worked in practice.
What I described as separation is a a decomposition into modules which are linked together through a contract. CSS has cascading and selectors, while JS has the DOM API.
BEM is just a development technique, not a technical requirement or capability. Without cascading, we would probably have components and inheritance.
> Remember how you started with how every UI system and framework was somehow this separtaion of style and presentation and structure and interactivity?
On Android and iOS, you have XML for layout. QT and GTK have support for CSS like styles. I remember at least one of the have supported XML for layout definition. They're not required, but they make it easier to build the UI as it almost always have a tree structure.