News for hackers. Stuff that matters.
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.
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;
Re:CSS adds vertical centering in 2024 by superkuh on Sunday August 18, 2024 @12:30PM (#41283325)
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
Re:CSS adds vertical centering in 2024 by atoav on Sunday August 18, 2024 @12:01PM (#41283139)
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...

Re:CSS adds vertical centering in 2024 by telios on Sunday August 18, 2024 @12:32PM (#41283335)
That is what the article claims, but... I see it as left-aligned. Firefox 129.0.1 on MacOS.
Re:CSS adds vertical centering in 2024 by akovaski on Sunday August 18, 2024 @12:47PM (#41283438)
It should be left aligned, but it should also be vertically centered within the resizable black-bordered box.
Re:CSS adds vertical centering in 2024 by squidbeak on Sunday August 18, 2024 @12:56PM (#41283502)
I've just looked at it in Firefox 129 and it's vertically centered.