20
u/Funwithloops Apr 27 '22
All the flex comments make me feel old pulling shit like this
.foo {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}10
2
2
Apr 27 '22
Same. But also major imposter syndrome when people rave about new tech that lets them do stuff like this, and I'm like "wait... I've been doing this without issue, I think.. Was there something wrong with what I was doing?"
1
1
46
u/wedontlikespaces Apr 27 '22
Yeah, I used 2 whole lines of CSS. Fear my powers!
40
15
u/HansonWK Apr 27 '22
Back when the backend guys last used css it was probably a whole lot more though.
3
u/burger-tron Apr 27 '22
two??
16
u/PositivelyAwful Apr 27 '22
.centered { display: grid; place-items: center; }0
8
u/wedontlikespaces Apr 27 '22
.imAmazing { align-items: center; justify-content: center; }On parent div set to grid
9
2
u/burger-tron Apr 27 '22
weird i've tried that and it didn't work
4
2
11
13
5
3
u/radim11 Apr 27 '22
I can do this sorcery in one line (tailwind power):
flex justify-center items-center
2
2
2
1
1
-2
33
u/[deleted] Apr 27 '22
Flex Op