Skip to content

Commit

Permalink
Merge pull request #2 from tmorehouse/tmorehouse/legend-size
Browse files Browse the repository at this point in the history
feat(css): add .col-form-legend-lg and .col-form-legend-sm classes
  • Loading branch information
tmorehouse authored Dec 1, 2017
2 parents ccf3fb2 + 901902d commit b0643d6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/4.0/components/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ At times, you maybe need to use margin or padding utilities to create that perfe

##### Horizontal form label sizing

Be sure to use `.col-form-label-sm` or `.col-form-label-lg` to your `<label>`s to correctly follow the size of `.form-control-lg` and `.form-control-sm`.
Be sure to use `.col-form-label-sm` or `.col-form-label-lg` to your `<label>`s to correctly follow the size of `.form-control-lg` and `.form-control-sm`. For `<legend>`s, use the `.col-form-legend-sm` or `.col-form-legend-lg` to control sizing.

{% example html %}
<form>
Expand Down
14 changes: 14 additions & 0 deletions scss/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,20 @@ select.form-control {
font-size: $font-size-base;
}

.col-form-legend-lg {
padding-top: $input-padding-y-lg;
padding-bottom: $input-padding-y-lg;
font-size: $font-size-lg;
line-height: $input-line-height-lg;
}

.col-form-legend-sm {
padding-top: $input-padding-y-sm;
padding-bottom: $input-padding-y-sm;
font-size: $font-size-sm;
line-height: $input-line-height-sm;
}


// Readonly controls as plain text
//
Expand Down

0 comments on commit b0643d6

Please sign in to comment.