Feature/delegate to first font in fallback list on React Native #416
+89
−0
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.
In working with some internal stuff, I needed to do a pretty gnarly code-split between Web, Android, and iOS due to different platforms having different names for their fonts. In addition, I needed to do
!importanton web to override a bunch of high specificity styles in a global CSS file. When I added !important, I noticed the incompatibility here.!importantis being sent down through anhtml.spanto the underlying<Text>'s TextStyleProps in RN, resulting in an undefined font family. RSD will also send down fallback fonts, also resulting in undefined fonts. Ideally!importantis never used in atomic styles, but in the event that it is used, I think it's reasonable to strip it off completely.Example:

Thought I'd try to throw up a PR that fixes it.
Two Questions
!importanton native imo.Snapshot tests written by AI