Support font element
See original GitHub issueDecision table
- My issue does not look like “The HTML attribute ‘xxx’ is ignored” (unless we claim support for it),
- My issue does not look like “The HTML element
<yyy>
is not rendered”
Bug Report
The HTML element given inside font is not rendering the color just rendering the content.
Setup
React Native
System:
OS: macOS 10.15.6
CPU: (4) x64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
Memory: 567.61 MB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 14.0.0 - /usr/local/bin/node
Yarn: Not Found
npm: 6.14.8 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.7, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK:
API Levels: 28, 29
Build Tools: 28.0.3, 29.0.2, 29.0.3
System Images: android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.0 AI-193.6911.18.40.6626763
Xcode: 11.7/11E801a - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_242 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.11.0 => 16.11.0
react-native: 0.62.2 => 0.62.2
npmGlobalPackages:
*react-native*: Not Found
Libraries
- react-native-render-html: 6.14.8
- react-native-webview: 6.14.8
Devices
- Device 1
- OS: All Android devices
- Diagnostic: reproduction
- Environment: development
- Device 2
- OS: All Android devices
- Diagnostic: reproduction
- Environment: development
Reproduction
Description
(Write your steps here:)
- Just used the npm
- Add this code
<font color='red'>₹ 270</font>
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
<font> - HTML: HyperText Markup Language - MDN Web Docs
Chrome Edge
font. Deprecated Full support. ChromeYes. Toggle history Full support. Edge12. Toggle hi...
color. Deprecated Full support. ChromeYes. Toggle history Full support. Edge12. Toggle...
Read more >HTML: <font> tag - TechOnTheNet
This HTML tutorial explains how to use the HTML element called the font tag with syntax ... The <font> tag has basic support...
Read more >HTML font tag - W3Schools
Not Supported in HTML5. The <font> tag was used in HTML 4 to specify the font face, font size, and color of text....
Read more >How To Style Text Elements with Font, Size, and Color in CSS
3/20 How To Style Text Elements with Font, Size, and Color in CSS ... These concepts help make text more readable and scannable...
Read more >HTML - Fonts - Tutorialspoint
HTML - Fonts, Fonts play a very important role in making a website more user friendly and increasing content readability. Font face and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jamesawer3 Here is a very basic implementation covering the “color” attribute. It makes me realize the API improvement we can make to enhance extensibility! Certainly a feed to craft the v6 API. But I want to emphasize that this is an obsolete tag, as stated by MDN:
RNRH v6.x
In RNRH 6, we will be defining a custom HTML element model. The model describes how to extract styles from the element attribute thanks to
getUADerivedStyleFromAttributes
method. We define a mixed content model becausefont
can behave like a span within an inline formatting context, and like a div within a block formatting context. See the official doc on model-based custom rendering.RNRH v4.x, 5.x
@jamesawer3 This library does not provide a renderer for the
font
tag, but you could write a custom renderer. This is a feature request rather than a bug! But we won’t access this request because this tag is deprecated.