diff --git a/core/api.txt b/core/api.txt index 5d12fba32c3..7bb40a54144 100644 --- a/core/api.txt +++ b/core/api.txt @@ -675,15 +675,33 @@ ion-content,method,scrollToTop,scrollToTop(duration?: number) => Promise ion-content,event,ionScroll,ScrollDetail,true ion-content,event,ionScrollEnd,ScrollBaseDetail,true ion-content,event,ionScrollStart,ScrollBaseDetail,true -ion-content,css-prop,--background -ion-content,css-prop,--color -ion-content,css-prop,--keyboard-offset -ion-content,css-prop,--offset-bottom -ion-content,css-prop,--offset-top -ion-content,css-prop,--padding-bottom -ion-content,css-prop,--padding-end -ion-content,css-prop,--padding-start -ion-content,css-prop,--padding-top +ion-content,css-prop,--background,ionic +ion-content,css-prop,--background,ios +ion-content,css-prop,--background,md +ion-content,css-prop,--color,ionic +ion-content,css-prop,--color,ios +ion-content,css-prop,--color,md +ion-content,css-prop,--keyboard-offset,ionic +ion-content,css-prop,--keyboard-offset,ios +ion-content,css-prop,--keyboard-offset,md +ion-content,css-prop,--offset-bottom,ionic +ion-content,css-prop,--offset-bottom,ios +ion-content,css-prop,--offset-bottom,md +ion-content,css-prop,--offset-top,ionic +ion-content,css-prop,--offset-top,ios +ion-content,css-prop,--offset-top,md +ion-content,css-prop,--padding-bottom,ionic +ion-content,css-prop,--padding-bottom,ios +ion-content,css-prop,--padding-bottom,md +ion-content,css-prop,--padding-end,ionic +ion-content,css-prop,--padding-end,ios +ion-content,css-prop,--padding-end,md +ion-content,css-prop,--padding-start,ionic +ion-content,css-prop,--padding-start,ios +ion-content,css-prop,--padding-start,md +ion-content,css-prop,--padding-top,ionic +ion-content,css-prop,--padding-top,ios +ion-content,css-prop,--padding-top,md ion-content,part,background ion-content,part,scroll diff --git a/core/src/components/content/content.scss b/core/src/components/content/content.common.scss similarity index 97% rename from core/src/components/content/content.scss rename to core/src/components/content/content.common.scss index 2493a39a125..c697c97bcdb 100644 --- a/core/src/components/content/content.scss +++ b/core/src/components/content/content.common.scss @@ -1,4 +1,5 @@ -@import "../../themes/native/native.globals"; +@use "../../themes/functions.color" as color; +@import "../../themes/mixins"; // Content // -------------------------------------------------- @@ -19,8 +20,6 @@ * @prop --offset-top: Offset top of the content * @prop --offset-bottom: Offset bottom of the content */ - --background: #{$background-color}; - --color: #{$text-color}; --padding-top: 0px; --padding-bottom: 0px; --padding-start: 0px; @@ -44,14 +43,14 @@ padding: 0 !important; /* stylelint-enable */ - font-family: $font-family-base; + font-family: var(--ion-font-family, inherit); contain: size style; } :host(.ion-color) .inner-scroll { - background: current-color(base); - color: current-color(contrast); + background: color.current-color(base); + color: color.current-color(contrast); } #background-content { diff --git a/core/src/components/content/content.ionic.scss b/core/src/components/content/content.ionic.scss new file mode 100644 index 00000000000..ec5d243306a --- /dev/null +++ b/core/src/components/content/content.ionic.scss @@ -0,0 +1,16 @@ +@use "../../themes/ionic/ionic.globals.scss" as globals; +@import "./content.common"; + +// Ionic Content +// -------------------------------------------------- + +:host { + --background: var(--ion-background-color, #{globals.$ion-bg-body}); + + /** + * Inherit the text color set on `body` + * (or any closer ancestor) instead of + * resetting it. + */ + --color: currentColor; +} diff --git a/core/src/components/content/content.ios.scss b/core/src/components/content/content.ios.scss new file mode 100644 index 00000000000..92ce6a5175b --- /dev/null +++ b/core/src/components/content/content.ios.scss @@ -0,0 +1,4 @@ +@import "./content.native"; + +// iOS Content +// -------------------------------------------------- diff --git a/core/src/components/content/content.md.scss b/core/src/components/content/content.md.scss new file mode 100644 index 00000000000..e8136e047ad --- /dev/null +++ b/core/src/components/content/content.md.scss @@ -0,0 +1,4 @@ +@import "./content.native"; + +// Material Design Content +// -------------------------------------------------- diff --git a/core/src/components/content/content.native.scss b/core/src/components/content/content.native.scss new file mode 100644 index 00000000000..f8ceb4ac938 --- /dev/null +++ b/core/src/components/content/content.native.scss @@ -0,0 +1,10 @@ +@import "./content.common"; +@import "../../themes/native/native.globals"; + +// Content +// -------------------------------------------------- + +:host { + --background: #{$background-color}; + --color: #{$text-color}; +} diff --git a/core/src/components/content/content.tsx b/core/src/components/content/content.tsx index 4e72ecc263a..cd344a50322 100644 --- a/core/src/components/content/content.tsx +++ b/core/src/components/content/content.tsx @@ -39,7 +39,11 @@ import type { ScrollBaseDetail, ScrollDetail } from './content-interface'; */ @Component({ tag: 'ion-content', - styleUrl: 'content.scss', + styleUrls: { + ios: 'content.ios.scss', + md: 'content.md.scss', + ionic: 'content.ionic.scss', + }, shadow: true, }) export class Content implements ComponentInterface { diff --git a/core/src/components/header/test/fade/header.e2e.ts-snapshots/header-fade-blurred-diff-ionic-md-ltr-light-Mobile-Chrome-linux.png b/core/src/components/header/test/fade/header.e2e.ts-snapshots/header-fade-blurred-diff-ionic-md-ltr-light-Mobile-Chrome-linux.png index fb231862e01..e6ba21b5d8e 100644 Binary files a/core/src/components/header/test/fade/header.e2e.ts-snapshots/header-fade-blurred-diff-ionic-md-ltr-light-Mobile-Chrome-linux.png and b/core/src/components/header/test/fade/header.e2e.ts-snapshots/header-fade-blurred-diff-ionic-md-ltr-light-Mobile-Chrome-linux.png differ diff --git a/core/src/components/header/test/fade/header.e2e.ts-snapshots/header-fade-blurred-diff-ionic-md-ltr-light-Mobile-Firefox-linux.png b/core/src/components/header/test/fade/header.e2e.ts-snapshots/header-fade-blurred-diff-ionic-md-ltr-light-Mobile-Firefox-linux.png index a74c5fe7815..2115376fb50 100644 Binary files a/core/src/components/header/test/fade/header.e2e.ts-snapshots/header-fade-blurred-diff-ionic-md-ltr-light-Mobile-Firefox-linux.png and b/core/src/components/header/test/fade/header.e2e.ts-snapshots/header-fade-blurred-diff-ionic-md-ltr-light-Mobile-Firefox-linux.png differ diff --git a/core/src/components/header/test/fade/header.e2e.ts-snapshots/header-fade-blurred-diff-ionic-md-ltr-light-Mobile-Safari-linux.png b/core/src/components/header/test/fade/header.e2e.ts-snapshots/header-fade-blurred-diff-ionic-md-ltr-light-Mobile-Safari-linux.png index e21be583f36..5e067f73854 100644 Binary files a/core/src/components/header/test/fade/header.e2e.ts-snapshots/header-fade-blurred-diff-ionic-md-ltr-light-Mobile-Safari-linux.png and b/core/src/components/header/test/fade/header.e2e.ts-snapshots/header-fade-blurred-diff-ionic-md-ltr-light-Mobile-Safari-linux.png differ diff --git a/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-ios-ltr-light-Mobile-Chrome-linux.png b/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-ios-ltr-light-Mobile-Chrome-linux.png index 40afc0e4dcd..c8ea1accc20 100644 Binary files a/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-ios-ltr-light-Mobile-Chrome-linux.png and b/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-ios-ltr-light-Mobile-Chrome-linux.png differ diff --git a/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-ios-ltr-light-Mobile-Firefox-linux.png b/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-ios-ltr-light-Mobile-Firefox-linux.png index 7b4048e8e32..63bd864ab15 100644 Binary files a/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-ios-ltr-light-Mobile-Firefox-linux.png and b/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-ios-ltr-light-Mobile-Firefox-linux.png differ diff --git a/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-ios-ltr-light-Mobile-Safari-linux.png b/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-ios-ltr-light-Mobile-Safari-linux.png index 8e67d5650a0..5a15ea221fa 100644 Binary files a/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-ios-ltr-light-Mobile-Safari-linux.png and b/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-ios-ltr-light-Mobile-Safari-linux.png differ diff --git a/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-md-ltr-light-Mobile-Chrome-linux.png b/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-md-ltr-light-Mobile-Chrome-linux.png index 40afc0e4dcd..c8ea1accc20 100644 Binary files a/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-md-ltr-light-Mobile-Chrome-linux.png and b/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-md-ltr-light-Mobile-Chrome-linux.png differ diff --git a/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-md-ltr-light-Mobile-Firefox-linux.png b/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-md-ltr-light-Mobile-Firefox-linux.png index aa8a848ffc3..63bd864ab15 100644 Binary files a/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-md-ltr-light-Mobile-Firefox-linux.png and b/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-md-ltr-light-Mobile-Firefox-linux.png differ diff --git a/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-md-ltr-light-Mobile-Safari-linux.png b/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-md-ltr-light-Mobile-Safari-linux.png index 8e67d5650a0..5a15ea221fa 100644 Binary files a/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-md-ltr-light-Mobile-Safari-linux.png and b/core/src/components/header/test/scroll-effect-condense-no-large-title/header.e2e.ts-snapshots/header-condense-no-large-title-initial-diff-ionic-md-ltr-light-Mobile-Safari-linux.png differ diff --git a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-ltr-light-Mobile-Chrome-linux.png b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-ltr-light-Mobile-Chrome-linux.png index c16eba3b895..bbb9024d9c9 100644 Binary files a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-ltr-light-Mobile-Chrome-linux.png and b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-ltr-light-Mobile-Chrome-linux.png differ diff --git a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-ltr-light-Mobile-Firefox-linux.png b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-ltr-light-Mobile-Firefox-linux.png index 259a5129b8b..cb43223f28d 100644 Binary files a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-ltr-light-Mobile-Firefox-linux.png and b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-ltr-light-Mobile-Firefox-linux.png differ diff --git a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-ltr-light-Mobile-Safari-linux.png b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-ltr-light-Mobile-Safari-linux.png index 3360b8c6baa..cae0405b082 100644 Binary files a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-ltr-light-Mobile-Safari-linux.png and b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-ltr-light-Mobile-Safari-linux.png differ diff --git a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-rtl-light-Mobile-Chrome-linux.png b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-rtl-light-Mobile-Chrome-linux.png index a198fb72cc9..9932e70a5db 100644 Binary files a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-rtl-light-Mobile-Chrome-linux.png and b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-rtl-light-Mobile-Chrome-linux.png differ diff --git a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-rtl-light-Mobile-Firefox-linux.png b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-rtl-light-Mobile-Firefox-linux.png index 1b735d2768a..a80d312e68e 100644 Binary files a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-rtl-light-Mobile-Firefox-linux.png and b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-rtl-light-Mobile-Firefox-linux.png differ diff --git a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-rtl-light-Mobile-Safari-linux.png b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-rtl-light-Mobile-Safari-linux.png index 2acedb7af98..8991f2876c6 100644 Binary files a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-rtl-light-Mobile-Safari-linux.png and b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-ionic-md-rtl-light-Mobile-Safari-linux.png differ diff --git a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-ltr-light-Mobile-Chrome-linux.png b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-ltr-light-Mobile-Chrome-linux.png index b472524f763..54bb9a5ddf5 100644 Binary files a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-ltr-light-Mobile-Chrome-linux.png and b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-ltr-light-Mobile-Chrome-linux.png differ diff --git a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-ltr-light-Mobile-Firefox-linux.png b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-ltr-light-Mobile-Firefox-linux.png index 26687e85d26..ba046de5958 100644 Binary files a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-ltr-light-Mobile-Firefox-linux.png and b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-ltr-light-Mobile-Firefox-linux.png differ diff --git a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-ltr-light-Mobile-Safari-linux.png b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-ltr-light-Mobile-Safari-linux.png index 65d732fab9a..3223f204201 100644 Binary files a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-ltr-light-Mobile-Safari-linux.png and b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-ltr-light-Mobile-Safari-linux.png differ diff --git a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-rtl-light-Mobile-Chrome-linux.png b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-rtl-light-Mobile-Chrome-linux.png index 0055befa930..956e7185c72 100644 Binary files a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-rtl-light-Mobile-Chrome-linux.png and b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-rtl-light-Mobile-Chrome-linux.png differ diff --git a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-rtl-light-Mobile-Firefox-linux.png b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-rtl-light-Mobile-Firefox-linux.png index 868717d4317..5bce805e4fb 100644 Binary files a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-rtl-light-Mobile-Firefox-linux.png and b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-rtl-light-Mobile-Firefox-linux.png differ diff --git a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-rtl-light-Mobile-Safari-linux.png b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-rtl-light-Mobile-Safari-linux.png index c70aa306203..5f0a59dc845 100644 Binary files a/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-rtl-light-Mobile-Safari-linux.png and b/core/src/components/modal/test/basic/modal.e2e.ts-snapshots/modal-basic-present-tablet-ionic-md-rtl-light-Mobile-Safari-linux.png differ diff --git a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-default-ionic-md-ltr-light-Mobile-Chrome-linux.png b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-default-ionic-md-ltr-light-Mobile-Chrome-linux.png index 69c3eb32afb..14ce75b9234 100644 Binary files a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-default-ionic-md-ltr-light-Mobile-Chrome-linux.png and b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-default-ionic-md-ltr-light-Mobile-Chrome-linux.png differ diff --git a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-default-ionic-md-ltr-light-Mobile-Firefox-linux.png b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-default-ionic-md-ltr-light-Mobile-Firefox-linux.png index 10db59edea1..eff52ff57bc 100644 Binary files a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-default-ionic-md-ltr-light-Mobile-Firefox-linux.png and b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-default-ionic-md-ltr-light-Mobile-Firefox-linux.png differ diff --git a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-default-ionic-md-ltr-light-Mobile-Safari-linux.png b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-default-ionic-md-ltr-light-Mobile-Safari-linux.png index 9c4e6f50573..230cb10c96f 100644 Binary files a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-default-ionic-md-ltr-light-Mobile-Safari-linux.png and b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-default-ionic-md-ltr-light-Mobile-Safari-linux.png differ diff --git a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-dual-knobs-ionic-md-ltr-light-Mobile-Chrome-linux.png b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-dual-knobs-ionic-md-ltr-light-Mobile-Chrome-linux.png index fb04994d67e..858e6b87fb4 100644 Binary files a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-dual-knobs-ionic-md-ltr-light-Mobile-Chrome-linux.png and b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-dual-knobs-ionic-md-ltr-light-Mobile-Chrome-linux.png differ diff --git a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-dual-knobs-ionic-md-ltr-light-Mobile-Firefox-linux.png b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-dual-knobs-ionic-md-ltr-light-Mobile-Firefox-linux.png index bb36dc62c35..ff6dc917546 100644 Binary files a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-dual-knobs-ionic-md-ltr-light-Mobile-Firefox-linux.png and b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-dual-knobs-ionic-md-ltr-light-Mobile-Firefox-linux.png differ diff --git a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-dual-knobs-ionic-md-ltr-light-Mobile-Safari-linux.png b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-dual-knobs-ionic-md-ltr-light-Mobile-Safari-linux.png index de22bef9459..305e8ca74f4 100644 Binary files a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-dual-knobs-ionic-md-ltr-light-Mobile-Safari-linux.png and b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-dual-knobs-ionic-md-ltr-light-Mobile-Safari-linux.png differ diff --git a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-pin-ionic-md-ltr-light-Mobile-Chrome-linux.png b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-pin-ionic-md-ltr-light-Mobile-Chrome-linux.png index 247222a85fd..3eb449a2f45 100644 Binary files a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-pin-ionic-md-ltr-light-Mobile-Chrome-linux.png and b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-pin-ionic-md-ltr-light-Mobile-Chrome-linux.png differ diff --git a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-pin-ionic-md-ltr-light-Mobile-Firefox-linux.png b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-pin-ionic-md-ltr-light-Mobile-Firefox-linux.png index 6b301f1efce..144e975e730 100644 Binary files a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-pin-ionic-md-ltr-light-Mobile-Firefox-linux.png and b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-pin-ionic-md-ltr-light-Mobile-Firefox-linux.png differ diff --git a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-pin-ionic-md-ltr-light-Mobile-Safari-linux.png b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-pin-ionic-md-ltr-light-Mobile-Safari-linux.png index 77bb1668af0..545966fb799 100644 Binary files a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-pin-ionic-md-ltr-light-Mobile-Safari-linux.png and b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-pin-ionic-md-ltr-light-Mobile-Safari-linux.png differ diff --git a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-ticks-ionic-md-ltr-light-Mobile-Chrome-linux.png b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-ticks-ionic-md-ltr-light-Mobile-Chrome-linux.png index 5d804a02067..9d979b25685 100644 Binary files a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-ticks-ionic-md-ltr-light-Mobile-Chrome-linux.png and b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-ticks-ionic-md-ltr-light-Mobile-Chrome-linux.png differ diff --git a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-ticks-ionic-md-ltr-light-Mobile-Firefox-linux.png b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-ticks-ionic-md-ltr-light-Mobile-Firefox-linux.png index 01190eec362..7e53b44321d 100644 Binary files a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-ticks-ionic-md-ltr-light-Mobile-Firefox-linux.png and b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-ticks-ionic-md-ltr-light-Mobile-Firefox-linux.png differ diff --git a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-ticks-ionic-md-ltr-light-Mobile-Safari-linux.png b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-ticks-ionic-md-ltr-light-Mobile-Safari-linux.png index f59d44c7728..f3c43f5b863 100644 Binary files a/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-ticks-ionic-md-ltr-light-Mobile-Safari-linux.png and b/core/src/components/range/test/basic/range.e2e.ts-snapshots/range-ticks-ionic-md-ltr-light-Mobile-Safari-linux.png differ diff --git a/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-rectangular-ionic-md-ltr-light-Mobile-Chrome-linux.png b/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-rectangular-ionic-md-ltr-light-Mobile-Chrome-linux.png index b7c0443ee98..d31ef78dc11 100644 Binary files a/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-rectangular-ionic-md-ltr-light-Mobile-Chrome-linux.png and b/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-rectangular-ionic-md-ltr-light-Mobile-Chrome-linux.png differ diff --git a/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-rectangular-ionic-md-ltr-light-Mobile-Firefox-linux.png b/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-rectangular-ionic-md-ltr-light-Mobile-Firefox-linux.png index 4281ba61902..6860517915f 100644 Binary files a/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-rectangular-ionic-md-ltr-light-Mobile-Firefox-linux.png and b/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-rectangular-ionic-md-ltr-light-Mobile-Firefox-linux.png differ diff --git a/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-rectangular-ionic-md-ltr-light-Mobile-Safari-linux.png b/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-rectangular-ionic-md-ltr-light-Mobile-Safari-linux.png index a15350e4c83..84d35bd8329 100644 Binary files a/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-rectangular-ionic-md-ltr-light-Mobile-Safari-linux.png and b/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-rectangular-ionic-md-ltr-light-Mobile-Safari-linux.png differ diff --git a/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-round-ionic-md-ltr-light-Mobile-Chrome-linux.png b/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-round-ionic-md-ltr-light-Mobile-Chrome-linux.png index 6f176cea6ff..a552633c255 100644 Binary files a/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-round-ionic-md-ltr-light-Mobile-Chrome-linux.png and b/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-round-ionic-md-ltr-light-Mobile-Chrome-linux.png differ diff --git a/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-round-ionic-md-ltr-light-Mobile-Firefox-linux.png b/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-round-ionic-md-ltr-light-Mobile-Firefox-linux.png index bf1f0177e80..8b2d38a10e0 100644 Binary files a/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-round-ionic-md-ltr-light-Mobile-Firefox-linux.png and b/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-round-ionic-md-ltr-light-Mobile-Firefox-linux.png differ diff --git a/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-round-ionic-md-ltr-light-Mobile-Safari-linux.png b/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-round-ionic-md-ltr-light-Mobile-Safari-linux.png index 65b2d7e77dd..488c663d8e8 100644 Binary files a/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-round-ionic-md-ltr-light-Mobile-Safari-linux.png and b/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-round-ionic-md-ltr-light-Mobile-Safari-linux.png differ diff --git a/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-soft-ionic-md-ltr-light-Mobile-Chrome-linux.png b/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-soft-ionic-md-ltr-light-Mobile-Chrome-linux.png index bc82bdac758..f2881a046cd 100644 Binary files a/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-soft-ionic-md-ltr-light-Mobile-Chrome-linux.png and b/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-soft-ionic-md-ltr-light-Mobile-Chrome-linux.png differ diff --git a/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-soft-ionic-md-ltr-light-Mobile-Firefox-linux.png b/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-soft-ionic-md-ltr-light-Mobile-Firefox-linux.png index 614dfd81e4b..f9dfc5a10af 100644 Binary files a/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-soft-ionic-md-ltr-light-Mobile-Firefox-linux.png and b/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-soft-ionic-md-ltr-light-Mobile-Firefox-linux.png differ diff --git a/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-soft-ionic-md-ltr-light-Mobile-Safari-linux.png b/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-soft-ionic-md-ltr-light-Mobile-Safari-linux.png index d3417656ab6..70c1f45d226 100644 Binary files a/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-soft-ionic-md-ltr-light-Mobile-Safari-linux.png and b/core/src/components/toast/test/shape/toast.e2e.ts-snapshots/toast-shape-soft-ionic-md-ltr-light-Mobile-Safari-linux.png differ diff --git a/core/src/themes/ionic/ionic.theme.default.scss b/core/src/themes/ionic/ionic.theme.default.scss index 8a9470275bd..dcd7fa84b15 100644 --- a/core/src/themes/ionic/ionic.theme.default.scss +++ b/core/src/themes/ionic/ionic.theme.default.scss @@ -24,13 +24,23 @@ // TODO(ROU-10778, ROU-10875): Sync the color names to the design system of // ios and md. This will allow us to have a single color map. + +// Note on bold `contrast` values: +// - Colors whose bold background stays dark in the dark palette (primary, +// secondary, success, danger) use $ion-text-light so the text stays white +// in both light and dark modes. +// - Colors whose bold background stays light in the dark palette (warning, +// light) use $ion-text-dark so the text stays near-black in both modes. +// - The remaining colors have bold backgrounds that are lightened in the dark +// palette, so they keep $ion-text-inverse, which flips with the theme to +// preserve contrast. $ionic-colors: ( primary: ( bold: ( base: globals.$ion-bg-primary-base-default, base-rgb: globals.$ion-bg-primary-base-default-rgb, - contrast: globals.$ion-text-inverse, - contrast-rgb: globals.$ion-text-inverse-rgb, + contrast: globals.$ion-text-light, + contrast-rgb: globals.$ion-text-light-rgb, shade: globals.$ion-bg-primary-base-press, tint: globals.$ion-semantics-primary-600, foreground: globals.$ion-text-primary, @@ -49,8 +59,8 @@ $ionic-colors: ( bold: ( base: globals.$ion-bg-info-base-default, base-rgb: globals.$ion-bg-info-base-default-rgb, - contrast: globals.$ion-text-inverse, - contrast-rgb: globals.$ion-text-inverse-rgb, + contrast: globals.$ion-text-light, + contrast-rgb: globals.$ion-text-light-rgb, shade: globals.$ion-bg-info-base-press, tint: globals.$ion-semantics-info-700, foreground: globals.$ion-text-info, @@ -89,8 +99,8 @@ $ionic-colors: ( bold: ( base: globals.$ion-bg-success-base-default, base-rgb: globals.$ion-bg-success-base-default-rgb, - contrast: globals.$ion-text-inverse, - contrast-rgb: globals.$ion-text-inverse-rgb, + contrast: globals.$ion-text-light, + contrast-rgb: globals.$ion-text-light-rgb, shade: globals.$ion-bg-success-base-press, tint: globals.$ion-semantics-success-800, foreground: globals.$ion-text-success, @@ -109,8 +119,8 @@ $ionic-colors: ( bold: ( base: globals.$ion-bg-warning-base-default, base-rgb: globals.$ion-bg-warning-base-default-rgb, - contrast: globals.$ion-text-default, - contrast-rgb: globals.$ion-text-default-rgb, + contrast: globals.$ion-text-dark, + contrast-rgb: globals.$ion-text-dark-rgb, shade: globals.$ion-bg-warning-base-press, tint: globals.$ion-primitives-yellow-300, foreground: globals.$ion-text-warning, @@ -129,8 +139,8 @@ $ionic-colors: ( bold: ( base: globals.$ion-bg-danger-base-default, base-rgb: globals.$ion-bg-danger-base-default-rgb, - contrast: globals.$ion-text-inverse, - contrast-rgb: globals.$ion-text-inverse-rgb, + contrast: globals.$ion-text-light, + contrast-rgb: globals.$ion-text-light-rgb, shade: globals.$ion-bg-danger-base-press, tint: globals.$ion-semantics-danger-700, foreground: globals.$ion-text-danger, @@ -349,8 +359,8 @@ $ionic-colors: ( bold: ( base: globals.$ion-primitives-base-white, base-rgb: globals.$ion-primitives-base-white-rgb, - contrast: globals.$ion-text-default, - contrast-rgb: globals.$ion-text-default-rgb, + contrast: globals.$ion-text-dark, + contrast-rgb: globals.$ion-text-dark-rgb, shade: globals.$ion-primitives-neutral-500, tint: globals.$ion-primitives-neutral-400, foreground: globals.$ion-text-default,