Conversation
added 5 commits
August 2, 2016 21:34
Handles `flex-grow` and `flex-shrink` properties
This recognizes the construct of <flex-grow> <flex-shrink>? that can appear in the `flex` property.
Parses `flex` rule.
Owner
|
Looks good to me. As to your question about validations, I propose two answers. First, it is possible that a type of a value is usable for a specific property for some levels of CSS and that same type of a value is usable in many other places. So I had different levels of CSS that needed to be supported. So I figured that the parsers shouldn't be in charge of warnings for CSS levels, when possible. They simply parse as much as is possible in as flexible way as is possible. The second answer is that this project wasn't designed well when it came to that part of the code. :-) |
Contributor
Author
|
Awesome, thanks @fidian! |
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.
Support the most basic Flexbox properties and values, namely:
display: flexflexcomposite propertyflex-grow,flex-shrink, andflex-basispropertiesThere are quite a few more properties associated with Flexbox, but I think just getting these in will be pretty useful as a place to start. I will follow up with work on the less commonly-used Flexbox properties.
A few thoughts, observations, and caveats:
flex-basisbut not supported by any browser, e.g.min-content. I did not include these in the allowed values for this property.flex-basishas a minimum CSS version of 3, it seems that that validation should automatically apply whenflex-basisis used as part of parsingflex. Is there a way to get this behavior without having to write out the validation again in the parser forflex?