Closed mntnoe closed 6 years ago
I also found https://github.com/facebook/react/blob/master/packages/react-dom/src/shared/CSSProperty.js which I'll look at mirroring. I noticed grid-area
, but I didn't see any examples of numeric-only usage in https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area, is it correct?
Good idea to look at what React does, as this might also be the properties many developers expect to remain unitless if they use the React API.
I looked the same examples myself earlier today. I've never used grid-area myself, but as I understand it, it's a shorthand syntax for grid-row-start etc.
Looked a bit more into it. The 5th paragraph from MDN:
When grid-column-start is omitted, if grid-row-start is a
, all four longhands are set to that value. Otherwise, it is set to auto.
So there is a situation were it make sense to set grid-area to a numeric value, which is to position the element in a specific cell with the same row and column number, but I guess that case will rarely make sense to use in real life...
See #70. I don't think there should be any issue with backward compatibility as none of the added properties accept
px
units.