mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 18:54:11 +08:00
feat(checkbox): display as block when justify or alignment properties are defined (#29783)
- Change the checkbox's `display` property to `block` when the `justify` or `alignment` property is set. - Set the default `justify-content` style to `space-between` so that a checkbox with `width: 100%` set without `justify` or `alignment` set will still have the same default - Modifies the `label` e2e test to remove the explicit width as setting the property will make them full-width - Adds two examples to the `label` e2e test of labels that do not have `justify` set but use `width: 100%` to ensure they are working as expected without it
This commit is contained in:
@ -72,6 +72,7 @@
|
||||
flex-grow: 1;
|
||||
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
height: inherit;
|
||||
|
||||
@ -170,6 +171,20 @@ input {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
// Justify Content & Align Items
|
||||
// ---------------------------------------------
|
||||
|
||||
// The checkbox should be displayed as block when either justify
|
||||
// or alignment is set; otherwise, these properties will have no
|
||||
// visible effect.
|
||||
:host(.checkbox-justify-space-between),
|
||||
:host(.checkbox-justify-start),
|
||||
:host(.checkbox-justify-end),
|
||||
:host(.checkbox-alignment-start),
|
||||
:host(.checkbox-alignment-center) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
// Label Placement - Start
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
|
Reference in New Issue
Block a user