This repository was archived by the owner on Mar 4, 2020. It is now read-only.
Merged
Conversation
mnajdova
approved these changes
Sep 13, 2018
…t-ui/react into fix/docs-radio-font-size
CHANGELOG.md
Outdated
|
|
||
| ### Fixes | ||
| - Fix `Popup` component imports @mnajdova ([#222](https://github.com/stardust-ui/react/pull/222)) | ||
| - Fix font size issue in docs @kuzhelov ([#221](https://github.com/stardust-ui/react/pull/221)) |
Member
There was a problem hiding this comment.
I don't think we should advertise doc changes here, only library changes. Thoughts on keeping the changelog specific to the library itself?
CHANGELOG.md
Outdated
| ## [Unreleased] | ||
|
|
||
| ### Fixes | ||
| - Fix `Popup` component imports @mnajdova ([#222](https://github.com/stardust-ui/react/pull/222)) |
levithomason
suggested changes
Sep 14, 2018
Member
levithomason
left a comment
There was a problem hiding this comment.
Some cleanup is due here.
Member
|
Agree on the broader issue. @davezuko and I also discussed this similar issue. There is also the converse case that something rendered down the tree might need to add statics or font faces in order to work. |
levithomason
approved these changes
Sep 14, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Repro steps:
Radiocomponent page (https://stardust-ui.github.io/react/components/radio)Expected result
Actual result
Cause:
The issue is caused by the following tree being rendered:
As we might see, when component example is rendered,
teamstheme as applied once again - with all its static styles that invalidatehtmlFontSize: 14pxoverride and sethtmlFontSizeto10px, the value defined byteamstheme.Provided fix eliminates specifying theme for individual example, as we would rather like to apply theme changes for all examples altogether.
Broader issue to fix
It is a very dangerous phenomena related to the fact that theme applied to subtree of components might change look of the overall page - with global CSS selectors being used in its static styles. More than that, this problem is very hard to diagnose, and for some situations I might imagine that it will be even hard to spot. I would propose to apply mechanisms of scoping static CSS selectors to the subtree theme as applied for (by default), with opened possibility to explicitly allow global CSS for Provider: