chinchang / chinchang/hint.css

Consider white-space : pre-line as a native part of hint--large

Open
#223 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
CSS
Stars
8.4k
Forks
680
PR merge metrics
No merged PRs in 30d

Description

Thanks for your beautifully structured and commented scss.

On those rare occasions when I put more text in a hint than most people would consider doing, I want to be able to use newlines within the hint. Unsurprisingly, this always coincides with using hint--large. As such, after I load hint.css, I drop this in:
.hint--large:after {
white-space : pre-line;
}
In other hint--sizes, pre-line doesn't play well, but as best I can tell, in hint--large it has no impact on normal amounts of text (it's backward-compatible), and is helpful for the rare, long hint that benefits from being broken up by newlines. As a practical example, consider a frequently useful hint for password fields such as:
At least one each of upper case, lower case, numeral, and other character.
At least 12 characters long.
It's not very long, but it's a bit bulky without the injected newline, and I think easier to read with the newline.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.