Skip to content

Commit 24330f7

Browse files
silverwindzeripath
andauthored
Fix heatmap rendering in Chrome and Safari (#13645)
* Fix heatmap rendering in Chrome and Safari Apparently SVG inside flexbox renders slightly different across browsers where Firefox would stretch to fit the parent while Chrome and safari wouldn't. Stretch the SVG to the width of the parent for consistent rendering. Also did a few minor tweaks on the min-height of the box so it takes up less space on smaller responsive breakpoints. Fixes: #13634 Fixes: #13637 * position tweak Co-authored-by: zeripath <art27@cantab.net>
1 parent f88a2ea commit 24330f7

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

web_src/less/features/heatmap.less

+23-8
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
align-items: center;
88
justify-content: center;
99

10+
> svg {
11+
width: 100%;
12+
}
13+
1014
svg:not(:root) {
1115
overflow: inherit;
1216
padding: 0 !important;
@@ -16,13 +20,6 @@
1620
fill: currentColor !important;
1721
}
1822

19-
@media @mediaLgAndDown {
20-
&,
21-
& + .divider {
22-
display: none;
23-
}
24-
}
25-
2623
.total-contributions {
2724
font-size: 11px;
2825
position: absolute;
@@ -31,20 +28,38 @@
3128
}
3229

3330
@media @mediaLgAndDown {
31+
& {
32+
min-height: 105px;
33+
}
3434
.total-contributions {
3535
left: 21px;
3636
}
3737
}
3838

3939
@media (max-width: 1000px) {
40+
& {
41+
min-height: 80px;
42+
}
4043
.total-contributions {
4144
font-size: 10px;
4245
left: 17px;
43-
bottom: -2px;
46+
bottom: -4px;
4447
}
4548
}
4649
}
4750

4851
.user.profile #user-heatmap {
4952
min-height: 135px;
5053
}
54+
55+
@media @mediaLgAndDown {
56+
.user.profile #user-heatmap {
57+
min-height: 115px;
58+
}
59+
}
60+
61+
@media (max-width: 1000px) {
62+
.user.profile #user-heatmap {
63+
min-height: 90px;
64+
}
65+
}

0 commit comments

Comments
 (0)