aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/less/features
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2021-04-09 18:51:27 +0200
committerGitHub <noreply@github.com>2021-04-10 00:51:27 +0800
commitafa781bf20e365dc3f524b2555767ca34fe37f7e (patch)
treefd6e250f5750368733a932acaabbf059998c121d /web_src/less/features
parent3dc099773d6d9ebb747db18f0b69fdd09e8b018d (diff)
downloadgitea-afa781bf20e365dc3f524b2555767ca34fe37f7e.tar.gz
gitea-afa781bf20e365dc3f524b2555767ca34fe37f7e.zip
Dropzone styling improvements (#15291)
* Dropzone styling improvements - Move all dropzone styles to separate file - Fix white background in arc-green - Fix rendering of non-square images and previews * increase thumbnail quality, set contain in js, replace blur effect with opacity
Diffstat (limited to 'web_src/less/features')
-rw-r--r--web_src/less/features/dropzone.less49
1 files changed, 49 insertions, 0 deletions
diff --git a/web_src/less/features/dropzone.less b/web_src/less/features/dropzone.less
new file mode 100644
index 0000000000..0490a0da18
--- /dev/null
+++ b/web_src/less/features/dropzone.less
@@ -0,0 +1,49 @@
+.dropzone {
+ border: 2px dashed var(--color-secondary) !important;
+ background: none !important;
+ box-shadow: none !important;
+ padding: 0 !important;
+ min-height: 5rem !important;
+ border-radius: 4px !important;
+}
+
+.dropzone .dz-button {
+ color: var(--color-text-light) !important;
+}
+
+.dropzone:hover .dz-button {
+ color: var(--color-text) !important;
+}
+
+.dropzone .dz-error-message {
+ top: 120px !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(.5) !important;
+}