You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: proposals/0000-reduce-fragmentation.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -363,6 +363,8 @@ srcList.forEach((src) => {
363
363
364
364
# Styles API (CSS subset)
365
365
366
+
The styling capabilities of React Native should be significantly expanded to cover more of the features that are heavily relied upon by web engineers. Furthermore, React Native needs to gracefully handle unknown style properties or values as is expected on the web. Rather than hard crashing it could print warnings to bring attention to any styles that are not currently supported on native.
367
+
366
368
## StyleSheet
367
369
368
370
*[ ] Deprecate `StyleSheet.absoluteFill`. Use `position:'absolute';inset:0;` instead.
@@ -371,6 +373,7 @@ srcList.forEach((src) => {
371
373
*[ ] Deprecate `StyleSheet.flatten()`. This API encourages runtime introspection of styles in render calls. This pattern is a performance cost (flattening arrays of objects), and prevents us from supporting build-time optimizations for web (e.g., extracting styles to CSS files).
372
374
*[ ] Deprecate or rename `setStyleAttributePreprocessor` (e.g., `unstable_setStyleAttributePreprocessor`).
373
375
*[ ]`StyleSheet.create()` should obfuscate styles to prevent introspection (i.e., revert identify function change). On web, we need to be able to remove the JavaScript style objects from bundles to support build-time optimization like extraction to CSS files.
376
+
*[ ]`StyleSheet` should be a function that returns native props, e.g., `const nativeProps = StyleSheet(...styles)`. On web, this is used to pass DOM `className` and `style` props, whereas on native it can be used to pass flattened/transformed styles and any other other native props to native components.
374
377
375
378
## CSS compatibility
376
379
@@ -386,7 +389,7 @@ srcList.forEach((src) => {
386
389
*[ ]`textShadow`. Add native support for CSS text shadows.
387
390
*[x]`transform`. Support using string values to set transforms.
388
391
*[x]`verticalAlign` is equivalent to `textAlignVertical`.
389
-
*[ ]`visiblity`. Add support for visually hiding elements.
392
+
*[ ]`visibility`. Add support for visually hiding elements.
390
393
*[x]`userSelect`. Equivalent to using `selectable` prop on `<Text>`.
0 commit comments