From ca0ce9feb0462c6d76e43557d70542ef2c580c5f Mon Sep 17 00:00:00 2001 From: silverwind Date: Tue, 21 Mar 2023 22:38:04 +0100 Subject: [PATCH] Set opaque background on markup and images (#23578) - Set opaque background on markup images so they can visually break `
` - Change padding of comment box so `padding` is provided by the `.markup` element instead of its parent, matching the file rendering view which does the same. Before: Screenshot 2023-03-19 at 19 22 03 After: Screenshot 2023-03-19 at 19 23 26 image Example documents: https://try.gitea.io/silverwind/symlink-test/src/branch/master/test-page.md https://github.com/silverwind/symlink-test/blob/master/test-page.md --- web_src/css/features/dropzone.css | 10 ++++++++++ web_src/css/markup/content.css | 2 ++ web_src/css/repository.css | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/web_src/css/features/dropzone.css b/web_src/css/features/dropzone.css index 0ce067ef3..16b3faf73 100644 --- a/web_src/css/features/dropzone.css +++ b/web_src/css/features/dropzone.css @@ -51,3 +51,13 @@ .dropzone .dz-preview:hover .dz-image img { filter: opacity(0.5) !important; } + +.dropzone-attachments .divider { + margin-top: 0 !important; + margin-bottom: 0 !important; +} + +.dropzone-attachments .grid, +.dropzone-attachments .thumbnails { + padding: .5rem 1rem; +} diff --git a/web_src/css/markup/content.css b/web_src/css/markup/content.css index 00283dd0a..5eef22096 100644 --- a/web_src/css/markup/content.css +++ b/web_src/css/markup/content.css @@ -3,6 +3,7 @@ font-size: 16px; line-height: 1.5 !important; word-wrap: break-word; + background: var(--color-box-body); } .markup.ui.segment { @@ -308,6 +309,7 @@ .markup img { max-width: 100%; box-sizing: initial; + background: var(--color-box-body); } .markup img[align="right"] { diff --git a/web_src/css/repository.css b/web_src/css/repository.css index abc812b5b..eb555abec 100644 --- a/web_src/css/repository.css +++ b/web_src/css/repository.css @@ -2740,6 +2740,12 @@ width: 100% !important; max-width: 100% !important; margin: 0 !important; + padding: 0 !important; +} + +.comment-body .markup { + padding: 1em; + border-radius: 0 0 var(--border-radius) var(--border-radius); /* don't render outside box */ } .edit-label.modal .form .column,