Skip to content

Commit

Permalink
fix radio and checkbox label positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
jdan committed Apr 23, 2020
1 parent 6ccdbd0 commit 59a40ed
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build/98.css
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ input[type="checkbox"] {
border: none;
}

input[type="radio"] + label,
input[type="checkbox"] + label {
line-height: 13px;
}

input[type="radio"] + label {
position: relative;
margin-left: 18px;
Expand All @@ -273,6 +278,7 @@ input[type="radio"] + label {
input[type="radio"] + label::before {
content: "";
position: absolute;
top: 0;
left: -18px;
display: inline-block;
width: 12px;
Expand Down
6 changes: 6 additions & 0 deletions docs/98.css
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ input[type="checkbox"] {
border: none;
}

input[type="radio"] + label,
input[type="checkbox"] + label {
line-height: 13px;
}

input[type="radio"] + label {
position: relative;
margin-left: 18px;
Expand All @@ -273,6 +278,7 @@ input[type="radio"] + label {
input[type="radio"] + label::before {
content: "";
position: absolute;
top: 0;
left: -18px;
display: inline-block;
width: 12px;
Expand Down
6 changes: 6 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ input[type="checkbox"] {
border: none;
}

input[type="radio"] + label,
input[type="checkbox"] + label {
line-height: 13px;
}

input[type="radio"] + label {
position: relative;
margin-left: var(--radio-total-width);
Expand All @@ -265,6 +270,7 @@ input[type="radio"] + label {
input[type="radio"] + label::before {
content: "";
position: absolute;
top: 0;
left: calc(-1 * (var(--radio-total-width-precalc)));
display: inline-block;
width: var(--radio-width);
Expand Down

0 comments on commit 59a40ed

Please sign in to comment.