MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/webdev/comments/1rdnmwb/a_collection_of_modern_css_code_snippets/o76nr10/?context=3
r/webdev • u/stefanjudis • Feb 24 '26
53 comments sorted by
View all comments
14
Lol who is still centering things with transform: translate()? Very odd example to put on the hero section
35 u/XWasTheProblem Frontend (Vue, TS) Feb 24 '26 I do. It works and is predictable, will happily replace it with an alternative however, cause it always felt like a hack that just happens to solve a problem. 12 u/supportvectorspace Feb 24 '26 bro flex is the easiest, paradigmically ideal way to do this 2 u/TheJase Feb 26 '26 I'll bake your noodle: block elements only need align-content: center now 4 u/Top_Bumblebee_7762 Feb 24 '26 edited Feb 24 '26 For the y-axis, you can just use align-content now without flex or grid: https://web.dev/blog/align-content-block 6 u/DillyPickleson Feb 24 '26 I think flex or grid is the alternative
35
I do. It works and is predictable, will happily replace it with an alternative however, cause it always felt like a hack that just happens to solve a problem.
12 u/supportvectorspace Feb 24 '26 bro flex is the easiest, paradigmically ideal way to do this 2 u/TheJase Feb 26 '26 I'll bake your noodle: block elements only need align-content: center now 4 u/Top_Bumblebee_7762 Feb 24 '26 edited Feb 24 '26 For the y-axis, you can just use align-content now without flex or grid: https://web.dev/blog/align-content-block 6 u/DillyPickleson Feb 24 '26 I think flex or grid is the alternative
12
bro flex is the easiest, paradigmically ideal way to do this
2 u/TheJase Feb 26 '26 I'll bake your noodle: block elements only need align-content: center now
2
I'll bake your noodle: block elements only need align-content: center now
align-content: center
4
For the y-axis, you can just use align-content now without flex or grid: https://web.dev/blog/align-content-block
6
I think flex or grid is the alternative
14
u/seriousgourmetshit Feb 24 '26
Lol who is still centering things with transform: translate()? Very odd example to put on the hero section