Skip to content

Fix icons height in container, and thus fix their center alignement within the container - #927

Open
ZougaRida wants to merge 1 commit into
pradyunsg:mainfrom
ZougaRida:fix-icons-alignement-in-content-container
Open

ZougaRida wants to merge 1 commit into
pradyunsg:mainfrom
ZougaRida:fix-icons-alignement-in-content-container

Conversation

@ZougaRida

Copy link
Copy Markdown

There seems to be a problem with icons alignemnt in many documentations using the theme. For example in urllib3 documentation we have like this for example (do check this out in the browser):
image
and for accute eyes it's obvious that the icons are not well aligned to the center, though after adding align-items: center (using for example in my case chrome devtools) we get this:
image
still not aligned yet, though after inspection that's because the intermediary html tags sitting between the svgs and the .content-icon-container get slightly different increasing heights at each level (do check this out with the devtools), so for example in our case here for the eye svg, its height is different from its parent <a> tag which is even more different from the parent div.view-this-page, but adding this rule fixes this problem entirely

.content-icon-container * {
  display: inline-flex;
}

as this makes sure that all intermediary nested html sitting between the svgs and the .content-icon-container don't change height values

Now after adding this rule we finally get good alignement (you'll notice the icon shifting after adding rule in devtools)
image

This fix will make sure that no weird alignement behaviors happen with the icons, like in this case with qt for python documentation

This branch has not been deployed

No deployments
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.

1 participant