1
1
mirror of https://github.com/go-gitea/gitea synced 2024-06-03 01:45:47 +00:00
gitea/web_src/css/features/dropzone.css
silverwind ca0ce9feb0
Set opaque background on markup and images (#23578)
- Set opaque background on markup images so they can visually break
`<hr>`
- 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:
<img width="243" alt="Screenshot 2023-03-19 at 19 22 03"
src="https://user-images.githubusercontent.com/115237/226198663-8ff4d940-6a15-452d-ac58-14485b37fbc7.png">

After:
<img width="261" alt="Screenshot 2023-03-19 at 19 23 26"
src="https://user-images.githubusercontent.com/115237/226198689-1bf56561-4726-46dc-b583-423d65e1e13a.png">
<img width="263" alt="image"
src="https://user-images.githubusercontent.com/115237/226199002-e93c817d-6d9c-4b98-bad8-0aa0bd45b62f.png">

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
2023-03-21 17:38:04 -04:00

64 lines
1.2 KiB
CSS

.ui .field .dropzone {
border: 2px dashed var(--color-secondary);
background: none;
box-shadow: none;
padding: 0;
border-radius: 4px;
min-height: 0;
}
.ui .field .dropzone .dz-message {
margin: 10px 0;
}
.dropzone .dz-button {
color: var(--color-text-light) !important;
}
.dropzone:hover .dz-button {
color: var(--color-text) !important;
}
.dropzone .dz-error-message {
top: 145px !important;
}
.dropzone .dz-image {
display: flex !important;
align-items: center !important;
justify-content: center !important;
border-radius: 0 !important;
}
.dropzone .dz-image img {
max-width: 100% !important;
max-height: 100% !important;
object-fit: contain !important;
}
.dropzone .dz-preview.dz-image-preview,
.dropzone-attachments .thumbnails img {
background: transparent !important;
}
.dropzone-attachments .thumbnails img {
height: 120px !important;
width: 120px !important;
object-fit: contain !important;
margin-bottom: 0 !important;
}
.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;
}