mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
fix(many): form controls labels have increased margin (#27447)
Issue number: resolves #27129 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Material Design has 16px of margin between the form control and the label, but we have 8px: https://m2.material.io/components/selection-controls#usage ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Updates default margin from 8px to 16px for checkbox, input, radio, range, select, textarea, and toggle. Note: This should only apply to labels that are on the same line as the form control. In other words, they do not apply to stacked/floating labels. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> --------- Co-authored-by: ionitron <hi@ionicframework.com>
This commit is contained in:
@ -194,7 +194,7 @@ input {
|
||||
* the checkbox should be on the end
|
||||
* when the label sits at the start.
|
||||
*/
|
||||
@include margin(0, 8px, 0, 0);
|
||||
@include margin(0, $form-control-label-margin, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -215,7 +215,7 @@ input {
|
||||
* when the label sits at the end.
|
||||
*/
|
||||
:host(.checkbox-label-placement-end) .label-text-wrapper {
|
||||
@include margin(0, 0, 0, 8px);
|
||||
@include margin(0, 0, 0, $form-control-label-margin);
|
||||
}
|
||||
|
||||
|
||||
@ -228,7 +228,7 @@ input {
|
||||
* the checkbox should be on the end
|
||||
* when the label sits at the start.
|
||||
*/
|
||||
@include margin(0, 8px, 0, 0);
|
||||
@include margin(0, $form-control-label-margin, 0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user