Add gridArea to unitless CSS properties #13550
Merged
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.
Ref #9185
Based on jquery/jquery@f997241
grid-area
accepts a numeric value which then translates togrid-row-start
, settinggrid-row-end
,grid-column-start
&grid-column-end
toauto
.I thought about adding a test but I don't understand how the ones in
CSSPropertyOperations-test.js
are supposed to work. For example, settinggrid-row
to10
will result in a normalizedgridRow
style property with a value"10 / auto"
. It seems they work just because they usems
-prefixed properties in format not actually used in IE as IE's grid properties were named differently?Another remark - in jQuery we have been auto-appending
px
to most numerical values as well but we decided it was a bad decision. It doesn't scale as it requires us to add more & more properties to the list. We've actually exposed the list at jQuery.cssNumber so that people don't always have to wait for us to add support for a property and do a release. What's more confusing, some of them would work both with & without thepx
suffix and that changes the meaning.That's why we decided that in jQuery 4 we'll drop the auto-prefixing blacklist and turn to a whitelist that lists only a few most common properties to which we want to auto-append
px
(mostly because they're extremely common and we don't want to break the world too much); we plan to not expand that list. You can see the current plan in my PR: jquery/jquery#4055. In particular, see the proposed whitelist in a (visualized) regexp in:https://github.com/jquery/jquery/blob/03e9dba3882868e1ee79f1fb0504326da925644f/src/css/isAutoPx.js.
Something to consider for a future React version.