Repository navigation
Conversation
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.
A
safe,unsafe,firstorlastprefix with nothing valid after it, e.g.align-items: safeorjustify-content: first baseline, throws aNullReferenceExceptioninConditionalStartsWithValueConverter, the cascade fails and the document renders empty. The same happens for someplace-*values likeplace-self: center leftorplace-content: baseline, because the shorthand converter tries to parse an empty token list when the second value doesn't match. The converter readenumerator.CurrentafterMoveNext()had already returned false, and it wrapped a null result when the keyword after the prefix didn't parse. Both cases now return null, so the declaration gets dropped as invalid and the rest of the document renders.Note that some of these values are valid per CSS Box Alignment 3 (
safe start,place-self: center left,place-items: start legacy, ...), but they still get rejected for now. Accepting the full grammar is a separate change.How to test this PR?
CI should succeed.
AlignmentPrefixWithoutKeywordIsRejectedcovers the lone prefixes andAlignmentValueDoesntBreakTheDocumentchecks that the document still renders with these values, both fail on master.