Re:CSS adds vertical centering in 2024
by superkuh on Sunday August 18, 2024 @11:57AM
(#41283121)
It's kind of funny seeing center-aligned "align-content just works!" aligned-left within the div in Firefox ESR. This is definitely a bleeding edge feature but a welcome one. It'll be some years before I chose to use it.
[ Parent
| on HN ]
Re:CSS adds vertical centering in 2024
by pinkmuffinere on Sunday August 18, 2024 @12:16PM
(#41283233)
Per the article, _align_ is for vertical distribution, and _justify_ is for horizontal. The example is actually behaving correctly. The naming is confusing though, imo
Re:CSS adds vertical centering in 2024
by red_trumpet on Sunday August 18, 2024 @12:27PM
(#41283304)
Well, to center the text in flow layout, you would use text-align:center;
Ah! Thanks for the correction. Unfortunately it's not centered vertically either. It's in the top left.
Re:CSS adds vertical centering in 2024
by pinkmuffinere on Sunday August 18, 2024 @01:19PM
(#41283676)
Oh lol that’s not great
You do realize this is about vertical alignment, right?
Re:CSS adds vertical centering in 2024
by cabbageicefruit on Sunday August 18, 2024 @12:22PM
(#41283274)
Firefox has supported this since 125. So if you are on ESR 128 it should work fine
https://caniuse.com/mdn-css_properties_align-content_block_c...
That is what the article claims, but... I see it as left-aligned. Firefox 129.0.1 on MacOS.
It should be left aligned, but it should also be vertically centered within the resizable black-bordered box.