feat(css): support text-wrap and white-space-collapse#828
Closed
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…perties - Introduced `text-wrap` shorthand and its longhands: `text-wrap-mode`, `text-wrap-style`. - Added `white-space-collapse` as a `white-space` longhand. - Enhanced rendering logic to resolve shorthand and longhand properties. - Updated tests to validate property application and inheritance behaviors.
304a3ff to
984b316
Compare
Member
|
Need adding the test specs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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