From f9f5654ab0e920bf97089fbabfb9eedbcf6fe8ae Mon Sep 17 00:00:00 2001 From: Shawn Taylor Date: Fri, 1 Dec 2023 11:26:05 -0500 Subject: [PATCH] feat(checkbox): add shadow part for label (#28604) Issue number: Part of #28300 --------- ## What is the current behavior? Developers are unable to adjust margin, width, etc. of the checkbox label ## What is the new behavior? - Checkbox label has a shadow part. ## Does this introduce a breaking change? - [ ] Yes - [x] No ## Other information As part of this work, I investigated moving `pointer-events: none` up the DOM tree so developers wouldn't be able to override it with the shadow part. In my testing, I was unable to see any difference in behavior with vs without `pointer-events: none`. Therefore, I removed it entirely. --- core/api.txt | 1 + core/src/components/checkbox/checkbox.scss | 12 ------------ core/src/components/checkbox/checkbox.tsx | 2 ++ .../components/checkbox/test/checkbox.spec.ts | 17 +++++++++++++++++ 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/core/api.txt b/core/api.txt index 91038fa3b4..9f30c35c09 100644 --- a/core/api.txt +++ b/core/api.txt @@ -315,6 +315,7 @@ ion-checkbox,css-prop,--checkmark-width ion-checkbox,css-prop,--size ion-checkbox,css-prop,--transition ion-checkbox,part,container +ion-checkbox,part,label ion-checkbox,part,mark ion-chip,shadow diff --git a/core/src/components/checkbox/checkbox.scss b/core/src/components/checkbox/checkbox.scss index c5b8030e84..4119c7d754 100644 --- a/core/src/components/checkbox/checkbox.scss +++ b/core/src/components/checkbox/checkbox.scss @@ -90,13 +90,6 @@ } .label-text-wrapper { - /** - * This ensures that double tapping this text - * clicks the