-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 border-radius being applied on one side only for aligned images #23414
Conversation
Please provide some motivation and before/after screenshots |
Are these screenshots from gitea? I don't recognize the page |
It's just how part of a README.md is rendered in Gitea when using: <img src="something.png" align="right"> (which is perfectly valid inside Markdown files) |
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.
I see the issue, I wonder why it's the way that it is. It came from #15572
Played a while with these styles. I can see that:
Since there is a global So I think this PR does right (update: if it doesn't break anything else) @silverwind how do you think? |
I'm not sure I understand the issue but changing |
I think the author has demoed a bad case, see the first picture in the comment #23414 (comment)
|
Why would I think we should remove .markup img {
border-radius: initial;
} We're already destroying certain image badges with that border-radius which aren't meant to have one. |
Maybe the global Does the global |
IIRC, it's only so avatars look a bit nicer, so I would recommend reducing the rule to only match avatars. |
I think this is also a good change that we can replicate. We should add opaque same-color background to markup images so they can break |
#23578 for the background change. |
@wxiaoguang wanna do the border-radius change? Then I'd say we close this one. |
I think we could ask the author first. @ltguillaume how do you think about the "image border radius" problem? A summary of the above discussion: Instead of changing 'padding' to 'margin', a preferred approach would be removing (and fine-tune) the global If you have other opinions or solutions, please help to share your idea. If you have interest about the approach above (removing the global |
My preference would be removing the border-radius in Markdown renders and introducing background-color. So not the quick fix I provided with this PR, but a fix that resembles GitHub's behavior. |
That makes perfect sense to me. Go for it! |
Yeah, let's do that change. It also matches GitHub behaviour, except they do set So, let's just move the rule to avatars only and keep the existing small radius. |
The "fixing border-radius" proposal is: Fix image border-radius #23886 |
@ltguillaume Thank you for your PR. Since #23886 / #23578 / #23750 have been merged, I guess the problem has been fixed? |
Yep, this can be closed! |
No description provided.