also looking at this
fix(native): preserve explicit grid row tracks
#2092
5 files
+42
-4
| @@ -2,7 +2,7 @@ import type { STXStyle } from './ir' | ||
| 2 | 2 | |
| 3 | 3 | /** Every property `STXStyle` declares, for inline `style=""` translation. */ |
| 4 | 4 | const STYLE_KEYS = new Set([ |
| 5 | 'display', 'gridColumns', 'gridTemplateColumns', 'gridAutoRows', | |
| 5 | 'display', 'gridColumns', 'gridTemplateColumns', 'gridTemplateRows', 'gridAutoRows', | |
| 6 | 6 | 'flex', 'flexGrow', 'flexShrink', 'flexBasis', 'flexDirection', 'flexWrap', |
| 7 | 7 | 'justifyContent', 'alignItems', 'alignSelf', 'alignContent', 'position', 'top', 'right', |
| 8 | 8 | 'bottom', 'left', 'zIndex', 'width', 'height', 'minWidth', 'maxWidth', 'minHeight', |
| @@ -161,7 +161,7 @@ export function parseNativeStyle(input: unknown, report: (diagnostic: NativeStyl | ||
| 161 | 161 | translated = undefined |
| 162 | 162 | } |
| 163 | 163 | else if (property === 'shadowOffset' || property === 'transform') translated = structuredStyle(property, value) |
| 164 | else if (property === 'gridTemplateColumns') translated = finite(value) || typeof value === 'string' ? value : undefined | |
| 164 | else if (property === 'gridTemplateColumns' || property === 'gridTemplateRows') translated = finite(value) || typeof value === 'string' ? value : undefined | |
| 165 | 165 | // Font weights are strings in the IR, even when authored as object numbers. |
| 166 | 166 | else if (property === 'fontWeight' && finite(value)) translated = String(value) |
| 167 | 167 | else if (typeof value === 'string') translated = value |