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

Generated embeddable pages missing some CSS #67

Open
joshuarrrr opened this issue Sep 19, 2017 · 5 comments
Open

Generated embeddable pages missing some CSS #67

joshuarrrr opened this issue Sep 19, 2017 · 5 comments

Comments

@joshuarrrr
Copy link
Contributor

There are some discrepancies in the CSS payload between the charts as they're seen in the editor and the way they're rendered when published. Specifically, the baked files are missing the chartwerk style resets and more general style resets (like changing all elements to border-box)

@hobbes7878
Copy link
Contributor

Thanks @joshuarrrr. This is definitely an issue I've been struggling to nail down. If you have a rule set you've noticed is missing, I'd love to see a PR on this or even just the list you come up with here.

@achavez
Copy link
Contributor

achavez commented Sep 20, 2017

Bummer. Sounds like what we tried to squash w/ #32. Thought that had fixed it.

Thanks, @joshuarrrr

@joshuarrrr
Copy link
Contributor Author

Sorry for the delay in circling back to this. I originally thought that the styles I was looking for would be in that reset file, too.

But it turns out that the styles I was looking for are here: https://github.com/DallasMorningNews/chartwerk-editor/blob/master/src/scss/_chartwerkReset.scss

In addition, there are some bootstrap styles that affect rendering in the editor, but aren't applied to the bake. The one I noticed is that the bootstrap scaffolding sets the box-sizing of all elements to border-box, which is needed for the horizontal bar chart to render as expected.

@hobbes7878
Copy link
Contributor

Thanks @joshuarrrr. I'm hoping to take another run at synthesizing the styles soon. Anything else you've noticed would be helpful. It's a bit of a whack-a-mole job...

@joshuarrrr
Copy link
Contributor Author

@hobbes7878 Yeah, I understand it's hard to do systematically. I just looked back at the style overrides I added, but I don't think there was anything else I noticed. Here are the rendered rules: https://github.com/IEEESpectrum/chartwerk-site/blame/bc6cb6ad0ddc0cd38ee7647e337d42e67526696f/chartwerk_hk/templates/chartwerk/bake.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants