Skip to content

Commit

Permalink
Replace flex display of labels with align-items: center
Browse files Browse the repository at this point in the history
This means that the label content is still centred against the input whilst not interfering with inline/block element dynamics within the label
  • Loading branch information
owenatgov committed Aug 23, 2023
1 parent d92046a commit b83975f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
}

.govuk-checkboxes__label {
display: flex;
flex-wrap: wrap;
align-items: center;
align-self: center;

// Ensure that the width of the label is never more than the width of the
// container minus the input width minus the padding on either side of
Expand All @@ -49,11 +47,6 @@
touch-action: manipulation;
}

// to account for when there are multiple children in a label
.govuk-checkboxes__label * {
width: 100%;
}

// [ ] Check box
.govuk-checkboxes__label::before {
content: "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@
}

.govuk-radios__label {
display: flex;
flex-wrap: wrap;
align-items: center;
align-self: center;

// Ensure that the width of the label is never more than the width of the
// container minus the input width minus the padding on either side of
Expand All @@ -50,11 +48,6 @@
touch-action: manipulation;
}

// to account for when there are multiple children in a label
.govuk-radios__label * {
width: 100%;
}

// ( ) Radio ring
.govuk-radios__label::before {
content: "";
Expand Down

0 comments on commit b83975f

Please sign in to comment.