Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global font properties #25

Closed
ghost opened this issue Oct 5, 2017 · 6 comments
Closed

Global font properties #25

ghost opened this issue Oct 5, 2017 · 6 comments
Labels
pr:review needed This PR requires review from maintainers.

Comments

@ghost
Copy link

ghost commented Oct 5, 2017

This is perfect for what I need, thanks for the good work. The only problem I have is that aside from baseFontSize, there doesn't seem to be an prop that I can use to change the color, fontFamily and the other attributes for all the text. Targeting each element using the tagsStyles work, but I just need a global ('*') rule to make all the text fit in (look the same) with the rest of my application.

Is there a workaround for this?

@Exilz
Copy link
Contributor

Exilz commented Oct 5, 2017 via email

@ghost
Copy link
Author

ghost commented Oct 5, 2017

@Exilz Hahaha, fair enough, thanks. Yes, I have started reading the source code. I'm checking out how easy it is to implement. If I have the time, I'll definitely submit a PR for this. Thank you again!

@Exilz Exilz added enhancement An enhancement is a change that is not a feature. is:help wanted We are welcoming PRs to address this. labels Oct 5, 2017
@Exilz
Copy link
Contributor

Exilz commented Oct 17, 2017

Hi @johncrisostomo,
I'm currently working on this feature right now as I found out in one of our apps that this is actually a very critical feature to add.

The problem is that with nested texts, if your lovely contributors feed you something like

<strong><p>This is a text</p></strong>

instead of

<p><strong>This is a text</strong></p>

Your text won't be in bold if you supplied a <p> style in your tagsStyles prop.

This is because since the <p> is the deepest tag, its style will be the last to be applied.

The solution to this problem, rather than fiddling with the renderer and moving around the styles is this new baseFontStyle prop that would replace your typical <p> style.

Here is the WIP commit on the development branch. I'd love it if you could take a look at it and tell me what you think.

@Exilz Exilz mentioned this issue Oct 19, 2017
@Exilz
Copy link
Contributor

Exilz commented Oct 19, 2017

This landed in 3.5.0-rc.1. Since this release is quite important, testing would be appreciated !

@ghost
Copy link
Author

ghost commented Oct 23, 2017

@Exilz Thanks so much for this! Sorry I have been busy the last few days, but will definitely test this out.

@Exilz Exilz added pr:review needed This PR requires review from maintainers. and removed enhancement An enhancement is a change that is not a feature. is:help wanted We are welcoming PRs to address this. labels Oct 26, 2017
@Exilz
Copy link
Contributor

Exilz commented Oct 27, 2017

Looks like it's working properly. Please re-open an issue if it breaks something on your side.

@Exilz Exilz closed this as completed Oct 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:review needed This PR requires review from maintainers.
Projects
None yet
Development

No branches or pull requests

1 participant