facebook / react-strict-dom

React Strict DOM (RSD) standardizes the development of styled React components for web and native.
https://facebook.github.io/react-strict-dom
MIT License
3.2k stars 161 forks source link

feat: add `mark` element #230

Closed ecreeth closed 2 weeks ago

ecreeth commented 4 weeks ago

This PR fixes #229

nmn commented 4 weeks ago

This looks right. I verified that the default styles for a <mark> element don't change with with color-scheme: dark applied and so the styling is consistent with what is expected on the web.

Based on my testing in Expo Snack, the rendered results are as expected in Android, but slightly wrong on iOS.

Android:

Screenshot 2024-10-31 at 12 54 47 am

iOS:

Screenshot 2024-10-31 at 12 51 52 am

Is this a bug we should report to RN? Note how the yellow background continues to end of the line even when the text has already wrapped to the next line?

ecreeth commented 4 weeks ago

Is this a bug we should report to RN? Note how the yellow background continues to end of the line even when the text has already wrapped to the next line?

I'll check later on this locally in RN 0.76.1 and RN 0.75.* to verify if this is a regression. I'll share screenshots!

necolas commented 4 weeks ago

Pretty sure that's a known RN bug

ecreeth commented 4 weeks ago
I could reproduce the issue locally and confirm it only happens on IOS, although I only tested it on the current version of the demo app. It is indeed a RN bug. Android IOS
Screenshot_1730419884 Simulator Screenshot - iPhone 15 Pro - 2024-10-31 at 20 11 16