Skip to content

Commit b54548a

Browse files
committed
add fallback for unsupporting browsers
1 parent c81cda0 commit b54548a

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

web_src/css/features/heatmap.css

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,23 @@
44
position: relative;
55
}
66

7-
@container (width > 0) {
8-
#user-heatmap {
9-
/* Set element to fixed height so that it does not resize after load. The calculation is complex
10-
because the element does not scale with a fixed aspect ratio. */
11-
height: calc((100cqw / 5) - (100cqw / 25) + 20px);
7+
@supports (container-type: inline-size) {
8+
@container (width > 0) {
9+
#user-heatmap {
10+
/* Set element to fixed height so that it does not resize after load. The calculation is complex
11+
because the element does not scale with a fixed aspect ratio. */
12+
height: calc((100cqw / 5) - (100cqw / 25) + 20px);
13+
}
14+
}
15+
}
16+
17+
/* Fallback for browsers that don't support container queries */
18+
@supports not (container-type: inline-size) {
19+
#user-heatmap.is-loading {
20+
aspect-ratio: 5.415;
21+
}
22+
.user.profile #user-heatmap.is-loading {
23+
aspect-ratio: 5.645;
1224
}
1325
}
1426

0 commit comments

Comments
 (0)