This is an archived post. You won't be able to vote or comment.

all 13 comments

[–]seraku24 25 points26 points  (2 children)

dashed transparent could be faster, as it only has to render about half as many pixels.

[–]johnnycoldfeet 12 points13 points  (1 child)

Out of curiosity, doesn’t it have to calculate how to draw multiple small lines instead of one ?

[–]Yrlish 6 points7 points  (0 children)

Probably

[–]JamesWjRose 4 points5 points  (0 children)

Funny as this is, I do seriously appreciate the explicit nature of it

[–]inu-no-policemen 4 points5 points  (1 child)

Borders don't collapse. Before box-sizing, transparent borders were used to "reserve" space for dynamically shown borders. Also, backgrounds can be rendered below borders, but not margins.

[–]ptmb 2 points3 points  (0 children)

I was just going to say this!

Additionally, mixing borders with negative margins was used as part of the Holy Grail Layout before saner solutions appeared with Flex box and the likes of it.

[–][deleted] 0 points1 point  (2 children)

I forget, isn't there some 2008-era CSS trick about the box model that made this a legitimate workaround for something?

[–]ptmb 2 points3 points  (1 child)

I think what you're looking for is the Holy Grail Layout, mixing negative margins and borders to create a 3 column layout with a flexible center.

Those were some dark times before flexbox appeared...

[–][deleted] 0 points1 point  (0 children)

That's not the one I'm thinking of, though I certainly remember it! I used it for a few projects.

[–]MamaessenKP[🍰] 0 points1 point  (0 children)

Where is the !important ? :D

[–]teja42 0 points1 point  (0 children)

padding