[Bug] Code app: Host container background color not configurable. White strips visible around dark-themed apps on mobile #376
Nerasnadnil
started this conversation in
Ideas
Replies: 1 comment
-
|
Thanks for opening this! This is a great feature request - the ability for apps to influence the host container's background color (or have the player respect theme-color) would be a meaningful improvement for dark-themed apps on mobile. We'll raise this with the team as we plan our next set of features. In the meantime, we'll be converting this issue to a discussion to keep the conversation going. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
When using a Power Apps code app (React/Vite) with a dark theme, white strips/bars are visible around the app content when playing on mobile. The app's iframe cannot control the host container's background color, creating a jarring visual contrast against dark app content.
Steps to Reproduce
Expected behavior
The Power Platform player host container should either:
Actual behavior
The app cannot style these areas because the host container is cross-origin and outside the iframe. CSS solutions like setting html/body background, ::before pseudo-elements, negative margins on the top bar, and attempting window.parent.document access all fail to resolve it.
Screenshots or Error Messages
N/A visual issue only, no errors.
Environment information
Additional context
This primarily affects mobile usage where the white strips against a dark app background create a very noticeable visual contrast. Workaround attempted: extending the app's top bar with top: -40px and a gradient from white to dark background to soften the transition. This helps visually but doesn't fully resolve the issue since the host container background is not controllable from within the app.
Beta Was this translation helpful? Give feedback.
All reactions