diff --git a/core/src/components/checkbox/checkbox.ionic.scss b/core/src/components/checkbox/checkbox.ionic.scss index 7c357b9805..57d5927015 100644 --- a/core/src/components/checkbox/checkbox.ionic.scss +++ b/core/src/components/checkbox/checkbox.ionic.scss @@ -319,11 +319,8 @@ input { pointer-events: none; } -// disabled, indeterminate checkbox -:host(.checkbox-disabled.checkbox-indeterminate) .checkbox-icon { - border-width: globals.$ionic-border-size-0; - - background-color: #{globals.$ionic-color-base-white}; +:host(.checkbox-disabled) .native-wrapper:after { + @include globals.disabled-state(); } // disabled, unchecked checkbox @@ -338,8 +335,6 @@ input { border-width: globals.$ionic-border-size-0; background-color: globals.$ionic-color-primary-base; - - opacity: 0.6; } // Checkbox Hover diff --git a/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-checked-disabled-ionic-md-ltr-light-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-checked-disabled-ionic-md-ltr-light-Mobile-Chrome-linux.png index e848a91c7b..bc1b4013d7 100644 Binary files a/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-checked-disabled-ionic-md-ltr-light-Mobile-Chrome-linux.png and b/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-checked-disabled-ionic-md-ltr-light-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-checked-disabled-ionic-md-ltr-light-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-checked-disabled-ionic-md-ltr-light-Mobile-Firefox-linux.png index 7e23e69a1a..a25153beba 100644 Binary files a/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-checked-disabled-ionic-md-ltr-light-Mobile-Firefox-linux.png and b/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-checked-disabled-ionic-md-ltr-light-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-checked-disabled-ionic-md-ltr-light-Mobile-Safari-linux.png b/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-checked-disabled-ionic-md-ltr-light-Mobile-Safari-linux.png index b39c68b862..0688e8bf7e 100644 Binary files a/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-checked-disabled-ionic-md-ltr-light-Mobile-Safari-linux.png and b/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-checked-disabled-ionic-md-ltr-light-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-disabled-ionic-md-ltr-light-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-disabled-ionic-md-ltr-light-Mobile-Chrome-linux.png index 4b8a6828d6..a0ab478569 100644 Binary files a/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-disabled-ionic-md-ltr-light-Mobile-Chrome-linux.png and b/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-disabled-ionic-md-ltr-light-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-disabled-ionic-md-ltr-light-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-disabled-ionic-md-ltr-light-Mobile-Firefox-linux.png index 4749e5c8a4..d45227fe2a 100644 Binary files a/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-disabled-ionic-md-ltr-light-Mobile-Firefox-linux.png and b/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-disabled-ionic-md-ltr-light-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-disabled-ionic-md-ltr-light-Mobile-Safari-linux.png b/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-disabled-ionic-md-ltr-light-Mobile-Safari-linux.png index 9cf5922f70..0c4ad88233 100644 Binary files a/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-disabled-ionic-md-ltr-light-Mobile-Safari-linux.png and b/core/src/components/checkbox/test/states/checkbox.e2e.ts-snapshots/checkbox-disabled-ionic-md-ltr-light-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/theme-ionic/index.html b/core/src/components/checkbox/test/theme-ionic/index.html index f1a9507915..426510a5ab 100644 --- a/core/src/components/checkbox/test/theme-ionic/index.html +++ b/core/src/components/checkbox/test/theme-ionic/index.html @@ -38,6 +38,8 @@ Checked Disabled Disabled, Checked + Indeterminate Disabled + Indeterminate Disabled Checked Checkmark Width Checkmark Shadow Part --size diff --git a/core/src/themes/ionic/ionic.globals.scss b/core/src/themes/ionic/ionic.globals.scss index 4eaf0bcd62..693b344968 100644 --- a/core/src/themes/ionic/ionic.globals.scss +++ b/core/src/themes/ionic/ionic.globals.scss @@ -2,7 +2,7 @@ @forward "../../foundations/ionic.vars.scss"; // Global Mixins -@forward "../mixins"; +@forward "./ionic.mixins"; // Global Utility Functions @forward "../functions.sizes"; diff --git a/core/src/themes/ionic/ionic.mixins.scss b/core/src/themes/ionic/ionic.mixins.scss new file mode 100644 index 0000000000..b154036c66 --- /dev/null +++ b/core/src/themes/ionic/ionic.mixins.scss @@ -0,0 +1,24 @@ +// Ionic Mixins +// forward the global mixin to be used on component scope +@forward "../mixins"; +// use global mixins on this ionic.mixin context +@use "../mixins" as mixins; +@use "../../foundations/ionic.vars.scss" as tokens; + +// Disabled mixin to be used on pseudo elements for the Ionic Theme disabled state +// +// ex: :host(.checkbox-disabled) .native-wrapper:after { +// @include globals.disable-state(); +// } +// +// -------------------------------------------------- +@mixin disabled-state() { + @include mixins.position(0, 0, 0, 0); + position: absolute; + + background-color: tokens.$ionic-state-disabled; + + content: ""; + + pointer-events: none; +}