sitevision / envision

UI Library by Sitevision
https://envisionui.io/
MIT License
17 stars 17 forks source link

Breaking words in env-collapse #417

Closed oskarakerlund-consid closed 11 months ago

oskarakerlund-consid commented 11 months ago

The .env-collapse class contains rules for both word-wrap and overflow-wrap, even though word-wrap is just an alias for overflow-wrap.

What makes it stranger is that they have different values (break-word and anywhere)

Also isn't word-break: normal contradictory to the above?

See: https://github.com/sitevision/envision/blob/c96db597d830a4ad2b1795f3f484dc76273b5b8c/packages/envision/src/scss/collapse.scss#L6-L8

henrikekelof commented 11 months ago

Thanks! word-wrap should be removed. It's legacy code for IE11 where "anywhere" wasn't an allowed value.

word-break:normal isn't contradictory, it's a different thing. Look at the note in the page you linked to: "In contrast to word-break, overflow-wrap will only create a break if an entire word cannot be placed on its own line without overflowing."