diff --git a/core/src/components.d.ts b/core/src/components.d.ts index dcfee8f33e..9e2cc8af1f 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -768,6 +768,7 @@ export namespace Components { * The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics). */ "color"?: Color; + "fixedSlotPlacement": 'afterContent' | 'beforeContent'; /** * If `true` and the content does not cause an overflow scroll, the scroll interaction will cause a bounce. If the content exceeds the bounds of ionContent, nothing will change. Note, this does not disable the system bounce on iOS. That is an OS level setting. */ @@ -5475,6 +5476,7 @@ declare namespace LocalJSX { * The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics). */ "color"?: Color; + "fixedSlotPlacement"?: 'afterContent' | 'beforeContent'; /** * If `true` and the content does not cause an overflow scroll, the scroll interaction will cause a bounce. If the content exceeds the bounds of ionContent, nothing will change. Note, this does not disable the system bounce on iOS. That is an OS level setting. */ diff --git a/core/src/components/content/content.scss b/core/src/components/content/content.scss index e24d5f4301..2f46f8ba29 100644 --- a/core/src/components/content/content.scss +++ b/core/src/components/content/content.scss @@ -255,9 +255,3 @@ */ transform: translateZ(0); } - -::slotted([slot="new"]) { - position: absolute; - - z-index: $z-index-fixed-content; -} diff --git a/core/src/components/content/content.tsx b/core/src/components/content/content.tsx index 145fd696a0..d4501da7e0 100644 --- a/core/src/components/content/content.tsx +++ b/core/src/components/content/content.tsx @@ -75,6 +75,8 @@ export class Content implements ComponentInterface { */ @Prop() fullscreen = false; + @Prop() fixedSlotPlacement: 'afterContent' | 'beforeContent' = 'afterContent'; + /** * If `true` and the content does not cause an overflow scroll, the scroll interaction will cause a bounce. * If the content exceeds the bounds of ionContent, nothing will change. @@ -423,7 +425,7 @@ export class Content implements ComponentInterface { } render() { - const { isMainContent, scrollX, scrollY, el } = this; + const { fixedSlotPlacement, isMainContent, scrollX, scrollY, el } = this; const rtl = isRTL(el) ? 'rtl' : 'ltr'; const mode = getIonMode(this); const forceOverscroll = this.shouldForceOverscroll(); @@ -447,7 +449,7 @@ export class Content implements ComponentInterface { >
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sed tellus nec mauris auctor dignissim @@ -109,14 +103,10 @@