Closed PierreMarchand20 closed 1 month ago
this change looks to have come in from #1545 via #1564. @gabalafou do you recall motivation for that change? I don't see notes about that particular change in the PR diff or conversation.
I confirm that changing baseline
to center
here https://github.com/pydata/pydata-sphinx-theme/blob/d7bbb79e444db1f4f4d6337c6fc76ad391eb1ece/src/pydata_sphinx_theme/assets/styles/sections/_header.scss#L89 solves the issue.
I'm going to propose to fix the icon links in a different way. But @PierreMarchand20's suggestion raises a question about baseline versus center alignment. When the text links wrap to two or more lines, center alignment produces text that doesn't seem to be snapped to the same grid, as following screenshot shows:
But with baseline alignment, all the text is aligned to two imaginary horizontal lines:
Which one do we want? @smeragoel, thoughts?
Quick thought while killing some time: I prefer the text being aligned at the top (baseline
) as it feels more intentional and easier to read vs center aligned - if there are long and short texts throughout it feels like my eyes jump all over the place
I did some quick research and I'd also recommend using baseline alignment.
Pros of Baseline Alignment:
While there might be cases where center alignment looks better, it's less effective when there's a high chance of text wrapping. So I think we should go with baseline alignment.
The text does look better with baseline, but I personally prefer center for the icons. May be they could use two different attributs?
ahh, I didn't realize this was affecting both text and icons. I agree that doing icons at center
and text at baseline
makes a lot of sense
I mean, I did not check, I only assumed that it was the case since you were talking about it. But I may have misunderstood.
I created a pull request (#1846) that keeps the text links in baseline alignment and puts the icon links in center alignment.
Thank you, it solved my issue!
I used the method described in #1554 to add custom icons. But with the 0.15.3, the alignement of the icons is broken:
vs
It seems to come from this css attribute:![image](https://github.com/pydata/pydata-sphinx-theme/assets/15056323/5b63bc63-1e77-4a20-88e2-ac2493904765)
vs