Support cascading styles
See original GitHub issueHello, I haven’t found anywhere any pointer about this particular issue yet: in the HTML code I receive from the server I sometimes have things like that <i><strong>Text</strong></i>
Problem, I have a custom font throughout the app and I haven’t found a way yet through tagsStyles
to specify a thing like:
i: {
strong: {
fontFamily: "MyFont-BoldItalic"
}
}
Is it event possible?
Issue Analytics
- State:
- Created 3 years ago
- Comments:9
Top Results From Across the Web
Introducing the CSS Cascade - MDN Web Docs
The cascade lies at the core of CSS, as emphasized by the name: Cascading Style Sheets. When a selector matches an element, the...
Read more >CSS - Cascading Style Sheets home page - W3C
Cascading Style Sheets (CSS) is a simple mechanism for adding style (e.g., fonts, colors, spacing) to Web documents.
Read more >An Introduction to Cascading Style Sheets - nwalsh.com
This article describes CSS1 and reflects the state of stylesheet support in late 1996. As of late 1997, all the major browsers have...
Read more >CSS - Wikipedia
For the use of CSS on Wikipedia, see Help:Cascading Style Sheets. Cascading Style Sheets (CSS) is a style sheet language used for describing...
Read more >Cascading Style Sheet Frequently Asked Questions - BlooBerry
How do I design for backward compatibility using style sheets? What browsers support style sheets? To what extent? Do any WYSIWYG editors support...
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
Thanks again @jsamr, with a little more work it solves my problem! For the record: I haven’t found a way to use this font.xml file on Android from React Native so I ended up overriding the default font for my app. Also, on iOS it just works out-of-the-box: I just referenced “FontName-Regular” on my HTML body (that I dynamically add if there is none) and the system chooses the right variant (between regular, bold, italic and bold-italic) correctly for each style.
Basically, the problem was coming from the fact that Android did not support applying
fontWeight: "bold"
andfontStyle: "italic"
to my font (it was falling back to Roboto) while iOS did. @jsamr’s first link lead me to fix it, thanks again!@psegalen Not at the moment! Cascading styles are complex and not yet supported. It could be a feature of a future release though! With the foundry refactor, that might be more feasible.