Skip to content

Commit ef60455

Browse files
committed
Dropzone styling improvements
- Move all dropzone styles to separate file - Fix white background in arc-green - Fix rendering of non-square images and previews
1 parent 3dc0997 commit ef60455

File tree

4 files changed

+47
-37
lines changed

4 files changed

+47
-37
lines changed

web_src/less/_repository.less

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,11 +1021,6 @@
10211021
color: var(--color-text-light-2);
10221022
font-style: italic;
10231023
}
1024-
1025-
.dropzone-attachments .thumbnails .ui.image {
1026-
max-height: 150px;
1027-
}
1028-
10291024
}
10301025

10311026
.ui.form {
@@ -2483,29 +2478,6 @@
24832478
padding-top: 15px;
24842479
}
24852480

2486-
.ui.form {
2487-
.dropzone {
2488-
border: 2px dashed var(--color-secondary);
2489-
background: none;
2490-
box-shadow: none !important;
2491-
padding: 0;
2492-
min-height: 5rem;
2493-
border-radius: 4px;
2494-
2495-
.dz-button {
2496-
color: rgba(0, 0, 0, .6);
2497-
}
2498-
2499-
&:hover .dz-button {
2500-
color: rgba(0, 0, 0, .8);
2501-
}
2502-
2503-
.dz-error-message {
2504-
top: 140px;
2505-
}
2506-
}
2507-
}
2508-
25092481
.settings {
25102482
.content {
25112483
margin-top: 2px;

web_src/less/features/dropzone.less

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
.dropzone {
2+
border: 2px dashed var(--color-secondary) !important;
3+
background: none !important;
4+
box-shadow: none !important;
5+
padding: 0 !important;
6+
min-height: 5rem !important;
7+
border-radius: 4px !important;
8+
}
9+
10+
.dropzone .dz-button {
11+
color: var(--color-text-light) !important;
12+
}
13+
14+
.dropzone:hover .dz-button {
15+
color: var(--color-text) !important;
16+
}
17+
18+
.dropzone .dz-error-message {
19+
top: 120px !important;
20+
}
21+
22+
.dropzone .dz-image {
23+
display: flex !important;
24+
align-items: center !important;
25+
justify-content: center !important;
26+
border-radius: 0 !important;
27+
}
28+
29+
.dropzone .dz-image img {
30+
max-width: 100% !important;
31+
max-height: 100% !important;
32+
object-fit: contain !important;
33+
}
34+
35+
.dropzone .dz-preview.dz-image-preview,
36+
.dropzone-attachments .thumbnails img {
37+
background: transparent !important;
38+
}
39+
40+
.dropzone-attachments .thumbnails img {
41+
height: 120px !important;
42+
width: 120px !important;
43+
object-fit: contain !important;
44+
margin-bottom: 0 !important;
45+
}

web_src/less/index.less

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
@import "./variables.less";
44
@import "./shared/issuelist.less";
5-
@import "./features/gitgraph.less";
65
@import "./features/animations.less";
6+
@import "./features/dropzone.less";
7+
@import "./features/gitgraph.less";
78
@import "./features/heatmap.less";
89
@import "./features/imagediff.less";
910
@import "./features/codeeditor.less";

web_src/less/themes/theme-arc-green.less

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -426,14 +426,6 @@ td.blob-hunk {
426426
box-shadow: 0 0 0 1px rgba(121, 71, 66, .5) inset, 0 0 0 0 transparent;
427427
}
428428

429-
.ui.form .dropzone .dz-button {
430-
color: rgba(158, 158, 158, .8);
431-
}
432-
433-
.ui.form .dropzone:hover .dz-button {
434-
color: rgba(158, 158, 158, 1);
435-
}
436-
437429
.ui.list .list > .item .header,
438430
.ui.list > .item .header {
439431
color: #dedede;

0 commit comments

Comments
 (0)