2 ms·
> why couldn't there have been a <vcenter> from the beginning? So if you want to support a layout that adapts to the size of a viewport you'd do what? Go throu
by megous 6y ago
> why couldn't there have been a <vcenter> from the beginning?
So if you want to support a layout that adapts to the size of a viewport you'd do what? Go through DOM with JS on each size change and rewrite DOM from <vcenter> to <somethingelse> and back?
With CSS as is, it's fairly easy to achieve.
- unabst 6y agoVertical centering would work just as horizontal centering works in 99% of the cases as expected. The syntax could be symmetric. We override and adjust as needed. Instead, we have nothing to override or adjust. We're forced to pick a layout system just for a specific feature, and add 5 lines of code that now interferes with everything else. The argument isn't that it's hard. It's that it could be so much easier. But also, that there just might be a fundamental issue with the philosophy of what could have been just html has evolved into the monstrosity that is css/html/javascript+framework+backend_render... with "the inability for vertical alignment to declared simply" as evidence.