4 ms·
This is such a bad idea that I had to comment here: 1. Doesn't scale. You do not want to hand pick text all over your site/web-app. 2. It's not semantic. 3. It
by berzniz 12y ago
This is such a bad idea that I had to comment here:
1. Doesn't scale. You do not want to hand pick text all over your site/web-app.
2. It's not semantic.
3. It's very confusing to new people who looks at your code.
4. If you ever change a single char in that sentence, you will have to re-break it yourself.
- maxsavin 12y agoThanks for commenting. It's a great idea from a design and readability perspective. It sounds like you do not like my implementation - you could be right. Here is another way of doing it.. maybe I'll update the post late: <div class="desktop-breakline"></div> with the appropriate @media query. It's obviously not for every situation. But for landing and marketing pages, headlines, etc, I'd go as far as to say it's absolutely essential.
- jrochkind1 12y agoI've also done simply: <span class="line">First line</span> <span class="line">Second line</span> Make em block level in css, collapsing to display:inline at small sizes. (Can even set the size with a specific class, bootstrap-style).
- maxsavin 12y agoYeah that works, but it creates a lot of code. <hr> is just 4 characters, and reminds me a lot of <br>, so its easy to read. Once you adapt your perspective to it, it becomes really awesome.
- mariusc23 12y ago<hr> is a poor choice from an accessibility perspective. You should use a <span> instead.