Live data from Hacker News

Pylon – Declarative layout primitives for CSS and HTML

almonk.github.io

1–10 of 78 posts

Re: Pylon – Declarative layout primitives for CSS and HTML

#4
I like this, but my 20 years in web dev can't help but chuckle. Remember when tables were declared evil for layout, so we had the shit show of trying to use CSS floats for everything, so then we added flexbox, and then grid, and here is a nice set of elements that is basically, well, somewhat less useful than tables for layout.

Don't mean to bash the poster, I just think it's interesting in the "everything old is new again" vain.

Re: Pylon – Declarative layout primitives for CSS and HTML

#5
This has issues:

    
        
            
            Westminster
            
            0.5 miles
        
        ....
It is more complex then it needs to be, it puts the styling into into the html, it kills all semantic meaning and pollutes the global namespace of element names.

It should be:

    
        
            Westminster
            0.5 miles
        
        ....
And then simply style the custom attributes to your liking via css. If these "primitives" would use classnames instead of element names, their styles could be added like this:

    
        
            Westminster
            0.5 miles
        
        ....

Re: Pylon – Declarative layout primitives for CSS and HTML

#7
post #6

SwiftUI should go more the jsx/HTML way. Not the other way around!

Why? I think both approaches are valid. SwiftUI separates data from representation. jsx+css is comparable. Pure HTML always contains some representation so the boundary is less clear.

Re: Pylon – Declarative layout primitives for CSS and HTML

#8

This has issues: Westminster 0.5 miles .... It is more complex then it needs to be, it puts the styling into into the html, it kills all semantic meaning and pollutes the global namespace of element names. It should be: Westminster 0.5 miles .... And then simply style the custom attributes to your liking via css. If these "primitives" would use classnames instead of element names, their styles could be added like thi…

https://en.wikipedia.org/wiki/Extensible_stylesheet_language to the rescue!
Post reply on HN