My CSS trick

Don’t you just hate it when you’ve got a flex container set to wrap and you’ve got your flex children with an outer wrapping div with padding on it to separate them from one another, e.g. 5px padding so each item is 5px away from the next, but then you end up with a gap at the far end where those 5px’s have accumulated? You want the items to be flush with the container if there’s enough for a full row don’t you?

Well here’s the trick. Set the flex container to:

width: calc(100% + [double-your-padding]px);

Oof! Flush with the container always! None of this negative margins shite.

The Barley Flex Hack

9 Likes

I’m fucking delighted with it. I know you’d ideally use grid for what I’ve described but I like using flex because of its support. I used to hate this problem and I’ve solved it.

1 Like
5 Likes

Let’s Make Love and Listen to Death From Above was a good song

8 Likes

Make love and listen to Death From Above

1 Like

The DiS Nu Rave thread sponsored by Topshop

5 Likes

Featuring Noel Fielding

Of course.

And that one off Skins

CSS is also a Brazilian band, famous for suggesting listening to popular alt-righters, Death From Above 1979 during sex

6 Likes

What’s your SHITDisco trick?

1 Like

Ah la la, Ah la la

1 Like

Interesting fact for you: CSS, Papa Roach, ¡Forward, Russia! and Bring Me The Horizon all share something in common. I bought tickets for their gigs primarilly to see the support band. In CSS’s case, it was Justice.

…now, wasn’t that interesting?

2 Likes

Hold up dfa are alt right???

I am such a total hack with css

html{display:fuckoffmate!important;}

seems so unfortunately

I can’t remember the specifics, but I think it came to light when guest Jesse was a guest on some nasty podcast or something or other. probably some other stuff too. I’m sure the link @dodecalicious posted explains it better.

1 Like

I always thought it was DFA records not DFA1979?

1 Like

This has turned my whole word upside down.

1 Like

My CSS trick? Me too

2 Likes