News for hackers. Stuff that matters.
Re:The Elements of Typographic Style Applied to the Web (2005) by Theodores on Tuesday April 24, 2018 @04:37PM (#16916323)
'white-space: pre' is what I learned there. Never knew such a thing could be possible. This means no need to do a 'nl2br' on the content if it contains no HTML, this is a common scenario, I am going to see if 'white-space: pre' just makes everything magically look okay.
Re:The Elements of Typographic Style Applied to the Web (2005) by WovenTales on Tuesday April 24, 2018 @08:18PM (#16917805)
The trick with that is that it also prevents wrapping except on new lines in the source. Looking at the potential values, I'd recommend pre-wrap instead, which at least allows avoiding horizontal scrolling, at the cost of requiring you to write the entire contents in a single line of markup. Annoyingly, it doesn't seem like there's a way to avoid multiple spaces being collapsed without also giving special meaning to keeping the source less than 120 characters (or whatever other measure) wide.