Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 27 additions & 9 deletions core/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -675,15 +675,33 @@ ion-content,method,scrollToTop,scrollToTop(duration?: number) => Promise<void>
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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import "../../themes/native/native.globals";
@use "../../themes/functions.color" as color;
@import "../../themes/mixins";

// Content
// --------------------------------------------------
Expand All @@ -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;
Expand All @@ -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 {
Expand Down
16 changes: 16 additions & 0 deletions core/src/components/content/content.ionic.scss
Original file line number Diff line number Diff line change
@@ -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;
Comment thread
BenOsodrac marked this conversation as resolved.
Resolved
}
4 changes: 4 additions & 0 deletions core/src/components/content/content.ios.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@import "./content.native";

// iOS Content
// --------------------------------------------------
4 changes: 4 additions & 0 deletions core/src/components/content/content.md.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@import "./content.native";

// Material Design Content
// --------------------------------------------------
10 changes: 10 additions & 0 deletions core/src/components/content/content.native.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@import "./content.common";
@import "../../themes/native/native.globals";

// Content
// --------------------------------------------------

:host {
--background: #{$background-color};
--color: #{$text-color};
}
6 changes: 5 additions & 1 deletion core/src/components/content/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 22 additions & 12 deletions core/src/themes/ionic/ionic.theme.default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Loading