-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Update outbound link icon alignment #1308
Update outbound link icon alignment #1308
Conversation
f1c74e0
to
506b788
Compare
@ulivz could you review or forward this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You would need some hacks to achieve horizontal centering of inline-block and inline elements in the line, you would need all other inline elements to be set vertical-align
which is not very elegant in VuePress, and your fix here is not really centered.
This is my fix:
- Code change:
- vertical-align: text-bottom;
+ vertical-align: middle;
+ position: relative;
+ top: -1px;
}
- Snapshot
It's also centered when you change the font-size:
Isn't better?
Thanks @ulivz! The goal was not to vertically align the icon but actually use |
I think outbound link will look better if keeping the same size as fonts. |
@shigma Yup but we can do it in another PR, since there are two things. |
I bet you are right. |
506b788
to
4d1ac0f
Compare
@ulivz I tried this out with a couple of different font sizes and the suggestion in #1308 (review) looks much better for larger fonts within Vuepress. I've updated the code and the screenshots in the description. Let me know what you think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot wait to merge it!
Thanks @ulivz! 😆 |
Summary
This will update outbound link icon alignment.
What kind of change does this PR introduce? (check at least one)
If changing the UI of default theme, please provide the before/after screenshot:
Does this PR introduce a breaking change? (check one)
The PR fulfills these requirements:
fix #xxx[,#xxx]
, where "xxx" is the issue number)You have tested in the following browsers: (Providing a detailed version will be better.)