diff options
author | Andrew Keller <andrew@kellerfarm.com> | 2014-02-17 18:25:13 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-02-20 21:50:14 +0400 |
commit | 46a7471f0e20af9d2efcc4a14c76d537e1551ac9 (patch) | |
tree | 7f9564d4ab8ffae8e56093916478b26ebf6afd9a /gitweb/static/gitweb.css | |
parent | 5f95c9f850b19b368c43ae399cc831b17a26a5ac (diff) |
gitweb: Avoid overflowing page body frame with large images
When displaying a blob in gitweb, if it's an image, specify constraints for
maximum display width and height to prevent the image from overflowing the
frame of the enclosing page_body div.
This change assumes that it is more desirable to see the whole image without
scrolling (new behavior) than it is to see every pixel without zooming
(previous behavior).
Signed-off-by: Andrew Keller <andrew@kellerfarm.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb/static/gitweb.css')
-rw-r--r-- | gitweb/static/gitweb.css | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css index 3b4d833823..3212601032 100644 --- a/gitweb/static/gitweb.css +++ b/gitweb/static/gitweb.css @@ -32,6 +32,11 @@ img.avatar { vertical-align: middle; } +img.blob { + max-height: 100%; + max-width: 100%; +} + a.list img.avatar { border-style: none; } |