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

Fix a bug where gallery card margins would not reduce on smaller width displays #22

Merged
merged 3 commits into from
Sep 27, 2022

Conversation

josh146
Copy link
Member

@josh146 josh146 commented Sep 27, 2022

Context: On smaller width displays, gallery cards would display as single column with large margins.

Description of the Change: Reduces the gallery card margins on small displays, to allow two column displays.

Benefits: As above.

Possible Drawbacks: n/a

Related GitHub Issues: n/a

Copy link
Collaborator

@Mandrenkov Mandrenkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR is reasonable although I'm curious if we know why the XST gallery item appears so squished:

Screen Shot 2022-09-27 at 11 49 36 AM

.github/CHANGELOG.md Outdated Show resolved Hide resolved
@josh146
Copy link
Member Author

josh146 commented Sep 27, 2022

This is super weird, it looks fine for me locally :(
image

I'll need to work out what the discrepancy is...

@josh146
Copy link
Member Author

josh146 commented Sep 27, 2022

@Mandrenkov I figured it out - I am using an older version of sphinx locally, and it looks like my version of sphinx wraps .. figures:: with a <div class="figure align-default">, which activates

.gallery-item-thumbcontainer .figure {
  margin: 10px;
  width: 160px;
}

but the version of sphinx used by the github actions doesn't 😢 It just uses <figure class="align-default">.

@josh146
Copy link
Member Author

josh146 commented Sep 27, 2022

Edit: think I fixed it in 55e4cf1. The issue isn't Sphinx, but docutils. In version docutils>=0.17, it changed how it generates HTML from ReST directives, preferring tags over divs.

@josh146 josh146 merged commit bbad60c into master Sep 27, 2022
@josh146 josh146 deleted the fix-gallery-width branch September 27, 2022 18:48
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

Successfully merging this pull request may close these issues.

None yet

2 participants