Skip to content

Commit 67d7e87

Browse files
committed
updates
1 parent 729ed58 commit 67d7e87

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

lib/form/checkbox.css

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@
1515

1616
.ui.checkbox {
1717
line-height: 1;
18+
position: relative;
1819

1920
> input {
20-
display: none;
21+
position: absolute;
22+
top: 0; left: 0;
23+
width: 100%;
24+
height: 100%;
25+
opacity: 0;
2126
}
2227

2328
> span {
@@ -39,8 +44,9 @@
3944
.icon {
4045
width: 0;
4146
font-size: var(--field-font-size-tiny);
42-
margin-left: -calc(var(--field-height) - .85var(--unit));
43-
margin-right: calc(1.4em + var(--checkbox-label-gutter));
47+
position: absolute;
48+
top: 50%; left: 50%;
49+
transform: translate3d(-50%, -50%, 1px);
4450
overflow: hidden;
4551
transition: ease var(--checkbox-transition-duration);
4652
transition-property: width, margin;
@@ -58,7 +64,7 @@
5864
}
5965

6066
.icon {
61-
width: 1.4em;
67+
width: 1.2em;
6268
margin-right: var(--checkbox-label-gutter);
6369
}
6470
}
@@ -98,4 +104,4 @@
98104
height: var(--field-height-large);
99105
}
100106
}
101-
}
107+
}

0 commit comments

Comments
 (0)