question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support cascading styles

See original GitHub issue

Hello, 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:closed
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
psegalencommented, Nov 30, 2020

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" and fontStyle: "italic" to my font (it was falling back to Roboto) while iOS did. @jsamr’s first link lead me to fix it, thanks again!

2reactions
jsamrcommented, Nov 27, 2020

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found