Skip to content

Commit

Permalink
lib/form-layout: Let data-field wrapped selects expand
Browse files Browse the repository at this point in the history
  • Loading branch information
garrett authored and martinpitt committed Mar 6, 2019
1 parent 3423064 commit ee70473
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions pkg/lib/form-layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -174,23 +174,29 @@
}
}

// Allow dropdowns to be less wide
&:not(.ct-form-layout-relax) > .ct-select,
&:not(.ct-form-layout-relax) > .dropdown {
width: auto !important;
}

> .form-control {
width: auto;
}

> .checkbox,
> .radio {
// Spacing is handled by grid, not margin
margin: 0;
}
}

> [role=group],
> .ct-validation-wrapper > [role=group],
> .ct-validation-wrapper > [data-field] {
// Allow dropdowns to expand as needed
&:not(.ct-form-layout-relax) {
> .dropdown {
width: auto !important;
}

// <select>s need to be coaxed to be 100%
> .ct-select {
width: 100%;
}
}
}

// Vertically align checkboxes and radios properly using flex
.checkbox > label,
.radio > label,
Expand Down

0 comments on commit ee70473

Please sign in to comment.