Tailwindcss: [Feature Proposal] rename .whitespace-no-wrap to .whitespace-nowrap

Created on 17 Mar 2019  路  7Comments  路  Source: tailwindlabs/tailwindcss

To be consistent with the CSS white-space: nowrap; property :-)

https://tailwindcss.com/docs/whitespace-and-wrapping/#app

Probably is CSS a bit inconsistent here (with pre-line for instance), but since I'm used to CSS, I find it much more natural to type whitespace-nowrap than whitespace-no-wrap.

Most helpful comment

I would keep the hyphenated version. See this: https://wiki.csswg.org/ideas/mistakes

Even the CSS WG would prefer the use of no-wrap (but alas we don't have a time machine)

All 7 comments

I would keep the hyphenated version. See this: https://wiki.csswg.org/ideas/mistakes

Even the CSS WG would prefer the use of no-wrap (but alas we don't have a time machine)

Hesitant to change this and introduce a BC break for no real great reason, but I do agree in hindsight I think I would have preferred nowrap even though it's dumb. We used to have flex-no-grow and flex-no-shrink which made it easier to justify whitespace-no-wrap but now that those are also gone maybe this is worth "fixing". It is after all the only whitespace class that doesn't match the CSS, although ironically we use whitespace instead of white-space 馃槄

For anyone curious, it's because "whitespace" (no hyphen) is the proper term, according to Wikipedia at least: https://en.wikipedia.org/wiki/Whitespace_character

Still unsure what to do here.

Just in case this makes it harder to decide, CSS Text Module Level 3 introduces yet another hyphenated value: break-spaces.

Going to keep this as-is because it's a BC break and we'd probably want to change flex-no-wrap too which would be another BC break.

ok, fair enough (I had no strong opinion about this issue and I'm glad that this has been considered and decided regarding the pros and contras)

was gonna suggest this as well by creating a new issue but found this one. @adamwathan change of mind by now if anything鈥檚 changed?

@deadcoder0904 it would now be a breaking change of the 1.X version (my issue was before the release of 1.0) and it is probably not worth it...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spyric picture spyric  路  3Comments

Tjoosten picture Tjoosten  路  3Comments

jbardnz picture jbardnz  路  3Comments

ouun picture ouun  路  3Comments

divdax picture divdax  路  3Comments