feat(css): support text-wrap and white-space-collapse #828
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds CSS Text Level 4 support for
text-wrapandwhite-space-collapse, including their longhand/shorthand resolution so the Dart render style stays consistent when authors mix shorthands and longhands.What’s included
text-wrapshorthand + longhands:text-wrap-mode,text-wrap-style.white-space-collapseas a longhand ofwhite-space.white-spaceand its longhands, and betweentext-wrapand its longhands.white-spacefrom longhands; rely on Dart-side resolution.Supported values
white-space-collapse:collapse | preserve | preserve-breaks | break-spacestext-wrap:wrap | nowrap | balance | prettytext-wrap-mode:wrap | nowraptext-wrap-style:auto | balance | prettyBehavior notes
white-spaceupdateswhite-space-collapse+text-wrap-mode, but does not overridetext-wrap-style.text-wrapderives from (text-wrap-mode,text-wrap-style):nowrapwhen mode isnowrap, otherwisewrap/balance/prettybased on style.Tests
webf/test/src/css/white_space_longhands_test.dart.cd webf && flutter test test/src/css/white_space_longhands_test.dart