Skip to content

Commit

Permalink
fix(css): tup-308, small form style issues
Browse files Browse the repository at this point in the history
- bigger gap between single checkbox and input
- add gap between multiple checkbox and input
- align multiple checkbox and input
- simpler, less specific checkbox label selector
- remove undesired label margin*

* This style was ineffectual—good—in 3.6, but "fixed"—bad—when ported.
  • Loading branch information
wesleyboar committed Jul 6, 2022
1 parent 03db17a commit ba992c8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ p.help-text:last-child {
.field-wrapper.checkboxinput {
display: inline-grid;

column-gap: 0.25em;
column-gap: 0.5em;
align-items: baseline;
grid-template-columns: min-content auto; /* shrink input, let label extend */
grid-template-areas:
Expand All @@ -65,6 +65,13 @@ p.help-text:last-child {
margin-bottom: 0; /* overwrite forms.css label */
}

ul.radioselect label,
ul.checkboxselectmultiple label {
display: flex;
gap: 0.5em;
align-items: center;
}

.asterisk {
margin-left: 0.5em;
color: var(--global-color-danger--dark);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ form {

label {
font-size: var(--global-font-size--small);

line-height: normal;
margin-bottom: 0.75em;
}
label:not(input[type="checkbox"] + label) {
:not(input[type="checkbox"]) + label {
display: block;
}
label:not(:first-child) {
margin-top: 2rem; /* mimic <p> `margin-bottom` */
/* margin-bottom: 0.5rem; *//* mimic Bootstrap _reboot.css */
}
fieldset:not(:last-child) {
margin-bottom: 3.5rem;
}
Expand Down

0 comments on commit ba992c8

Please sign in to comment.