4 ms·
Why not just use a BR and set its "display" to "none" at the appropriate breakpoint(s)? Why abuse HR in this way?
by bshimmin 12y ago
Why not just use a BR and set its "display" to "none" at the appropriate breakpoint(s)? Why abuse HR in this way?
- maxsavin 12y agoYou can't do display none for BR element. But even if you could, you wouldn't want to overwrite it for the entire website. Also, the HR element is a very old, largely unused, and styleable, so its a good candidate for this.
- bshimmin 12y ago"display: none;" works just fine for BRs! Sure, you don't want to override it for the entire web site, but if you're being specific enough about showing/hiding line breaks at certain breakpoints, then I don't see why you can't just specify with the class of the container (or whatever) which particular BR you want to hide in a given context.
- maxsavin 12y agoHmm.. good point, it wasn't working when I tried it. But I still prefer to include it on a high level into my CSS frameworks. Set it, forget it, and use freely.
- bshimmin 12y agoAt least a few people on HN use Lynx - they won't like you much for this!
- tobyhinloopen 12y agoWhy on earth would you use Lynx?
- tobyhinloopen 12y ago<br class=hidden-for-mobile> :D
- maxsavin 12y agoYou also may want the flexibility of both. For example: <strong>Headline</strong><br> The quick brown fox jumped<hr> over the lazy dog. And the code is clear and easy to read.
- gavinballard 12y agoNot sure if "largely unused" is right. I use them all the time, and have seen them in pretty common use around the place.
- maxsavin 12y agoAh, I think you are in a minority. Or maybe I'm very opinionated :)
- deleted 12y ago[deleted]