Skip to content

Commit 0e12044

Browse files
committed
frontend: limit toggle layout in scaled up version
Toggles in responsive mode looked broken if Android Font size is increased. This can be simulated by changing the font-size on the root HTML element to 150%.
1 parent 1be33d1 commit 0e12044

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

frontends/web/src/components/toggle/toggle.module.css

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
flex-shrink: 0;
44
margin: 0;
55
min-height: var(--item-height-xsmall);
6+
height: min(2.4rem, 28px);
67
position: relative;
78
width: 60px;
89
}
910

1011
.container input {
11-
height: 0;
12-
opacity: 0;
13-
width: 0;
12+
clip: rect(0, 0, 0, 0);
13+
height: 1px;
14+
overflow: hidden;
15+
position: absolute;
16+
width: 1px;
1417
}
1518

1619
.container input[disabled] + .slider {
@@ -35,7 +38,7 @@
3538
border-radius: 2px;
3639
bottom: 4px;
3740
content: "";
38-
height: 16px;
41+
height: min(1.6rem, 20px);
3942
left: 4px;
4043
position: absolute;
4144
width: 26px;

0 commit comments

Comments
 (0)