4 ms·
Hey Gitlab, could you consider adding the following CSS so that README images don't break out of their containers? Having to horizontally scroll to see this ima
by lelandfe 5y ago
Hey Gitlab, could you consider adding the following CSS so that README images don't break out of their containers? Having to horizontally scroll to see this image is brutal.
.md img {
max-width: 100%;
height: auto;
}
I think that goes here: https://gitlab.com/gitlab-org/gitlab/-/blob/55a4cc5a53903250985b4237115065c51edb90e6/app/assets/stylesheets/framework/typography.scss#L48-50 https://gitlab.com/gitlab-org/gitlab/-/blob/55a4cc5a53903250...
- factorialboy 5y agoI bet someone with the right skills could just make a PR / MR for this fix.
- m4tthumphrey 5y agoI bet this change will be live in the next few hours.
- TIPSIO 5y agoWith the way people write CSS today, is there an argument today to not just have it be part of a reset, e.g.: img { max-width: 100%; }
- lelandfe 5y agoThat they are not already doing that made me believe it was intentional. Principle of least astonishment to start. Anyway I agree, and have that present on all projects.
- chrismorgan 5y agoYou’d want to pair that with `height: auto`, or else it’ll damage the aspect ratio of images that specify width and height attributes (which you always should).
- lelandfe 5y agoYep, will add. Image in question is missing those values. I personally think README images should be be lazyloaded (making those inlined aspect ratios important) but I guess that's down to the maintainer.
- junon 5y agoJust zoom out of course. Silly users!
- deleted 5y ago[deleted]
- sytse 5y agoThanks! I asked our Dev Evangelists to look into this suggestion.
- john_cogs 5y agoHey there, GitLab Dev Evangelist here. Thank you for flagging this and for the suggestion. A change based on your comment was merged earlier today (with a link to your comment in the description): https://gitlab.com/gitlab-org/gitlab/-/merge_requests/78933 https://gitlab.com/gitlab-org/gitlab/-/merge_requests/78933