Hacker News new | past | comments | ask | show | jobs | submit login

Inline style would definitely be a bandwidth hog, that's for sure. As to how much extra bandwidth it would take up and would that make a noticeable difference given that most bandwidth is used for images and video is up for debate.



I think we'd regain any bandwidth cost through compression. Compare the rise of VNC (and VNC-like protocols) compared to X - it turns out there's no advantage to sending drawing commands rather than sending bitmaps, because they both compress to the same thing.


Automatic inlining is used in some contexts, notably emails where everything else works barely-if-at-all.

The biggest loss of using inline styles everywhere would be for instances where the appearance of the DOM is changing dynamically. Instead of just saying "hey, make that node have the class 'shinyWidget'", you'd wind up needing to specify all the styles that shinyWidget includes - and then reliably un-apply them when the node was no longer shiny.

Bonus fun if two things want to change the style of a single element, though that's still sometimes a headache with CSS and specificity rules.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: