-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add a "CSS reset" to jbrowse-react-linear-genome-view to prevent parent styles from outside the component leaking in #1763
Conversation
5a2d710
to
c323910
Compare
I updated this PR to use CSS called {all:initial} on the div containing the jbrowse-react-linear-genome-view This avoids parent styles leaking into our LGV which, while normally CSS is used for cascading and would be "good" for helping style our LGV, I think our little component is a little "sacrosanct" and not to be fiddled with by parent styles |
My initial comment noted also that examples of our embedded code like https://elliothershberg.shinyapps.io/sars-cov-2-spike-mutations/ can be seen to have somewhat weird styles presumably by parent styles leaking into the embedded lgv |
c323910
to
1780e37
Compare
1780e37
to
d95444b
Compare
Codecov Report
@@ Coverage Diff @@
## master #1763 +/- ##
==========================================
- Coverage 58.74% 58.73% -0.01%
==========================================
Files 455 455
Lines 21033 21033
Branches 4979 4979
==========================================
- Hits 12355 12353 -2
- Misses 8368 8370 +2
Partials 310 310
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Simple change, but probably useful. Do you see this having any impact on some of the CSS weirdness in the Nextstrain demo? Might be more related to some hardcoded numbers in their layout, but stuff got pushed around there.
On a related note, it might be good to add a prop to the component that controls the paper depth of the parent div of the component. I can see instances (like Nextstrain) where people might not want the default depth/shadow effect.
@elliothershberg yes I think this will probably fix a lot of the weirdness in the nextstrain demo |
Fixes #1678
Uses a "CSS reset" on the div containing the jbrowse-react-linear-genome-view to avoid parent styles leaking into this component
Ref
https://css-tricks.com/almanac/properties/a/all/