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

Standard badges rendering too big #65

Closed
darribas opened this issue Dec 28, 2018 · 7 comments
Closed

Standard badges rendering too big #65

darribas opened this issue Dec 28, 2018 · 7 comments

Comments

@darribas
Copy link

I'm not sure this is a problem (not even sure it's a problem, or the problem is my poor HTML chops...) of jupyter-book but I've ran into it and might be or relevance for other folks. I'm automatically converting .md files from GitHub repos that include badges from Travis, etc. When I render the book, they look too big. See, next to the md file resulting from building the book:

capture

Is there any obvious easy solution? Ideally, I'd like to keep the badges too as they're useful information for the book audience.

Thank you very much, and thank you very much for (another) awesome project!

]d[

@choldgraf
Copy link
Member

Holy moly, that's way too big haha... I bet it's the css of the default template. Do you see where the size of the image is being applied in the css?

@choldgraf
Copy link
Member

(I'd look myself but not at a computer right now)

@darribas
Copy link
Author

Mmmm… I have no idea. It seems it uses something called inuit. The thing though is I wouldn't necessarily want to change the rendering of all images, just those relating to badges. Would that be a) doable b) not too hard for a CSS newbie like me? Thank you very much in advance :)

@choldgraf
Copy link
Member

Lemme give it a shot as a part of #66 :-)

@choldgraf
Copy link
Member

66 removes the width: 100% CSS rule for any image (only for notebook output images), which I think is going to solve this problem for you. You might need to use your own CSS class to make sure the badge snaps to the left instead of being centered (for an example, see the badge that's in the intro.md file of that PR)

@darribas
Copy link
Author

Bam! I just changed the two lines suggested in #66 for the width:100% and this now looks a lot better:

capture

The centering is something I can definitely live with. Thank you very much for the prompt and excellent response @choldgraf! I'm closing the ticket now as consider it addressed :-)

@choldgraf
Copy link
Member

woot! If you want those left-aligned, you can add a custom class to the images either by adding {:.myclass} and that'll be added to the p element above the image, which you can then style as you like. You could also manually embed the images w/ HTML, which works in markdown, e.g. <img src="mysrc.png" style="margin-left: 0px" />

choldgraf added a commit to choldgraf/jupyter-book that referenced this issue Apr 28, 2020
…ute_fix

removing execute from book build CLI
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

2 participants