-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complete flexbox support for Chrome #1945
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
css/properties/align-items.json
Outdated
"chrome": [ | ||
{ | ||
"version_added": "52", | ||
"notes": "Older versions of the specification treat absolute positioned children as though they are a 0 by 0 flex item. Later specification versions take the children out of the flow and set their positions based on align and justify properties. Chrome implements the new behavior beginning with Chrome 52." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be moved to the end of the "version_added": "29"
block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
css/properties/align-items.json
Outdated
"notes": "Older versions of the specification treat absolute positioned children as though they are a 0 by 0 flex item. Later specification versions take the children out of the flow and set their positions based on align and justify properties. Chrome implements the new behavior beginning with Chrome 52." | ||
}, | ||
{ | ||
"version_added": "29" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be followed by "partial_implementation": true
, eg:
{
"version_added": "29",
"partial_implementation": true,
"notes": "…" // Contains the text from above
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
css/properties/align-items.json
Outdated
@@ -8,10 +8,19 @@ | |||
"webview_android": { | |||
"version_added": "4.4" | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that it should be in alphabetical order. But I'm not convinced that webview_android
should be the same as chrome
? According to caniuse the full spec was implemented in 4.4
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or did you mean the same as chrome
but with "version_added": "4.4"
instead of "version_added": "29"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chrome Developer Relations here. He means that Android webview follows Chrome version numbering, not Android version numbering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. Didn't know. Thanks
css/properties/align-items.json
Outdated
"prefix": "-webkit-", | ||
"version_added": "21" | ||
} | ||
], | ||
"chrome_android": { | ||
"version_added": null | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chrome_android
should be the same as chrome
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few more things that require attention.
Also, please don’t amend the commit, and instead make additional commits implementing the requested changes, as this makes reviewing the PR easier.
"chrome_android": { | ||
"version_added": null | ||
}, | ||
"chrome": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first element of the chrome
and chrome_android
support array should be:
{
"version_added": "52"
}
followed by the current contents of this array.
This is because Chrome 52 now implements this fully.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed! Also added this for justify-content
and order
until @jpmedley has confirmed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the full list of what's supported in Chrome: https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/css/CSSValueKeywords.json5?l=520
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I don't quite understand that to do with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
justify-content is supported on Chromium browsers as is anything else not commented out of that list. Were you not asking me to confirm the status of justify-content in Chrome?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, my bad. The comment was poorly formulated. And it concerned align-self
, not justify-content
. What I meant to say was that added the note about absolute positioned flex children for align-self
too after reading this:
However, the latest version of the spec takes them fully out of flow and sets the static position based on align and justify properties.
And I was wondering if that would be correct? Does that changed behavior affect the order
property as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't appear so.
Sorry about that link. It was supposed to link to align-self. Shortly after I posed it, a new version of the source file got merged to trunk which made the line number wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks 👍
"version_added": "21" | ||
} | ||
], | ||
"chrome_android": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
css/properties/align-self.json
Outdated
@@ -10,16 +10,26 @@ | |||
}, | |||
"chrome": [ | |||
{ | |||
"version_added": "36" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto, but with "version_added": "36"
@@ -12,16 +12,25 @@ | |||
"chrome": [ | |||
{ | |||
"version_added": "29", | |||
"notes": "Older versions of the specification treat absolutely positioned children as though they are 0 by 0 flex items. Later versions of the specification take them out of the flow and set their positions based on align and justify properties. Versions 52 and later implement the new behavior." | |||
"partial_implementation": true, | |||
"notes": "Older versions of the specification treat absolute positioned children as though they are a 0 by 0 flex item. Later specification versions take the children out of the flow and set their positions based on align and justify properties. Chrome implements the new behavior beginning with Chrome 52." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jpmedley Can you confirm this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is correct. https://www.chromestatus.com/feature/6600926009753600
css/properties/order.json
Outdated
"version_added": "29" | ||
"version_added": "29", | ||
"partial_implementation": true, | ||
"notes": "Older versions of the specification treat absolute positioned children as though they are a 0 by 0 flex item. Later specification versions take the children out of the flow and set their positions based on align and justify properties. Chrome implements the new behavior beginning with Chrome 52." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
css/properties/align-items.json
Outdated
@@ -8,10 +8,19 @@ | |||
"webview_android": { | |||
"version_added": "4.4" | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chrome Developer Relations here. He means that Android webview follows Chrome version numbering, not Android version numbering.
"chrome_android": { | ||
"version_added": null | ||
}, | ||
"chrome": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the full list of what's supported in Chrome: https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/css/CSSValueKeywords.json5?l=520
"notes": "Older versions of the specification treat absolute positioned children as though they are a 0 by 0 flex item. Later specification versions take the children out of the flow and set their positions based on align and justify properties. Chrome implements the new behavior beginning with Chrome 52." | ||
}, | ||
{ | ||
"prefix": "-webkit-", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Elchi3 Do you have a preference on whether 'webkit' includes dashes. I just grepped my local repo and found we're pretty inconsistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that in the css
tree or the api
tree?
The css
tree should contain dashes, whereas the api
tree should not (see the Vendor Prefix Glossary page for more information).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not know that. (I'm only every removing prefixes.) The css/ folder appears to be consistent. The api/ folder is not. I didn't check the others.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What @ExE-Boss says is correct. Not sure if we could validate some more automatically there.
|
@ExE-Boss have I missed anything? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, r+
* Complete flexbox support for Chrome * Add version for full Chrome implementation of flexbox * Follow Chrome version for flexbox in Webview * Revert Flex type * Remove partial implementation from `order`
https://www.chromestatus.com/feature/4837301406400512
https://www.chromestatus.com/feature/6600926009753600
https://caniuse.com/#feat=flexbox