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:
Brandy Carney
2024-08-28 15:06:20 -04:00
committed by GitHub
parent d737ec1e12
commit 4ccd15e47a
194 changed files with 97 additions and 47 deletions

View File

@ -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
// ----------------------------------------------------------------