You're right, flexbox should be the new way to center things with CSS, I'm just so used to the "Absolute/Translate" method, it's time for me to update.
Just one thing. The "Absolute/Translate" method works just fine through all modern browsers, is just that you are missing the commas between the "50%" in the translate rule, also you added a width of 50%, go ahead and remove this and the word "Foo" will be just on the center this time.
Whoops! Good catch. I guess that's the problem working with build systems these days, that rule would have been flagged.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.