Twitter | Search | |
Vadim Makeev
h1+h1, h1+h2, h1+h3, h1+h4, h1+h5, h1+h6, h2+h1, h2+h2, h2+h3, h2+h4, h2+h5, h2+h6, h3+h1, h3+h2, h3+h3, h3+h4, h3+h5, h3+h6, h4+h1, h4+h2, h4+h3, h4+h4, h4+h5, h4+h6, h5+h1, h5+h2, h5+h3, h5+h4, h5+h5, h5+h6, h6+h1, h6+h2, h6+h3, h6+h4, h6+h5, h6+h6 { margin-top: 0 } —Apple
Reply Retweet Like More
Ben 🍕 Aug 5
Replying to @pepelsbey_
I don‘t get it and feel dumb about it. Pls explain! 😳
Reply Retweet Like
Vadim Makeev Aug 5
Replying to @benjamiski
It’s just some CSS from source code. Beautiful, isn’t it?
Reply Retweet Like
Ben 🍕 Aug 5
Replying to @pepelsbey_
Really beautiful! 🤮
Reply Retweet Like
Reinaldo Aug 6
Replying to @pepelsbey_
When you are worth a trillion you can do whatever you want
Reply Retweet Like
everdimension Aug 6
Replying to @pepelsbey_
Probably generated by a preprocessor. Nothing really wrong with this. Also I believe that for this reason there exists a proposal for a heading selector.
Reply Retweet Like
Vadim Makeev Aug 6
Replying to @everdimension
I’m more concerned about approach itself. I’d rather use .heading + .heading instead. It would definitely make this code much readable, reliable, reusable, and modular. I mean, what if I want <p> to look and behave like heading? I should have a simple way of doing this.
Reply Retweet Like
Luiz Felipe Aug 6
Replying to @pepelsbey_
What is the sense of that?
Reply Retweet Like
Vadim Makeev Aug 6
Replying to @luizfelipe_fg
To avoid margins between all kinds of headings in any combination.
Reply Retweet Like
Herson con H Aug 6
Replying to @pepelsbey_
heh, I love preprocessors
Reply Retweet Like
Aqui era tudo mato. Aug 7
No margins and no capes!
Reply Retweet Like
Hamm 🐘 Aug 7
Replying to @pepelsbey_
I think the best way is to zero out all top margins and just use margin-bottom for spacing. The way reset.css does the job in bootstrap.
Reply Retweet Like
Miguel Garrido Aug 7
Replying to @pepelsbey_
h1 + *, h2 + *, h3 + *, h4 + *, h5 + *, h6 + * { margin-top: .8em; } —(Also) Apple
Reply Retweet Like
Joanna Falkowska Aug 7
Replying to @pepelsbey_
if it's stupid but it works, it's still stupid
Reply Retweet Like
Ian Strong Aug 7
Replying to @vuelvolar @pepelsbey_
I went looking too and came across the same haha
Reply Retweet Like
Tigran Aug 7
Replying to @pepelsbey_
But... but it looked so elegant in source: `h1, h2, h3, h4, h5 { & + & { margin-top: 0; } }`
Reply Retweet Like
Dana Aug 7
Replying to @pepelsbey_
Apple be like...
Reply Retweet Like
Tomasz Wędziński Aug 7
But this don't resolve indicated problem. You still have spacing between two headings
Reply Retweet Like
Hamm 🐘 Aug 7
We dont want to remove spacing. We want to know the spacing where comes from. Bottom or Top? Using this approach you can figure out all margins belongs to the top element.
Reply Retweet Like
Julien Pradet Aug 7
Sure, but you'd also want a default html string to look nice. It's especially important when a lot of content is contributed through some kind of CMS and not everything is under the developer's control. This bit of CSS is way more elegant than a ton of customisations in an editor
Reply Retweet Like