Comment by lelandfe
4 years 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/55a4cc5a53903250...
You’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).
Yep, 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.
Hey 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
With the way people write CSS today, is there an argument today to not just have it be part of a reset, e.g.:
That 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.
Just zoom out of course. Silly users!
Thanks! I asked our Dev Evangelists to look into this suggestion.
I bet this change will be live in the next few hours.
I bet someone with the right skills could just make a PR / MR for this fix.