-
Notifications
You must be signed in to change notification settings - Fork 339
Wrong alignment for custom icons #1839
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
Comments
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
|
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 ( |
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 |
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! |
This pull request fixes #1839 while also trying to simplify the way we use the Boostrap "navbar-nav" class. Prior to this PR, we have both: 1. "navbar-nav" **class** applied to **text** links rendered by "navbar-nav" **template** 2. "navbar-nav" class applied to **icon** links rendered by "navbar-icon-links" template This is what led to the bug in #1839 because I must have thought that the .navbar-nav selector was for the text links, **not** the icon links. I see two possible ways of resolving this ambiguity: 1. Keep the navbar-nav class on the text links, but remove it from the icon links. This requires adding some style rules to the icon links so they look the same with and without the class. This is the option shown in this PR. 3. Keep the navbar-nav class on both sets of links, but change the name of the navbar-nav template to something else. This would require updating the docs, and I think it would also require theme adopters to update their theme config files, which is why I didn't choose this option. --------- Co-authored-by: Daniel McCloy <[email protected]>
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:

vs
The text was updated successfully, but these errors were encountered: