Skip to content

Conversation

@fritz-c
Copy link
Contributor

@fritz-c fritz-c commented Sep 21, 2022

Description

There is currently no straightforward way to override the background color of the presentation backdrop.

  • The code seems to have been designed to accommodate custom background colors, but it was missing logic that would prevent values set in theme.backdropStyle from being overridden by the default black color.
  • The prop that had implementation allowing it to override the default background color, backdropStyle, is accessible from the Deck props, but not present in the TypeScript types, so TypeScript users had to use a workaround to push it through.

My judgement was that there was no need to have multiple ways to accomplish the same outcome with the styling props, as it complicates the implementation and the API. I ultimately kept the current behavior the same, except for the bug that causes theme.backdropStyle.background[Color] to be ignored, but marked the excess props (backdropStyle, suppressBackdropFallback, theme.suppressBackdropFallback) as deprecated in the TypeScript types, to be removed in the next major release.

Fixes #1051

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • This change requires a documentation update

How Has This Been Tested?

New unit tests

@github-actions github-actions bot temporarily deployed to staging-1231 September 21, 2022 20:18 Inactive
Copy link
Contributor

@carloskelly13 carloskelly13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. I wonder if the documentation should clearly define what a Backdrop is, aka, the thing rendered behind the slides. And sometimes if your browser is sized at the same ratio of your slides you might not even see it.

@github-actions github-actions bot temporarily deployed to staging-1231 September 21, 2022 22:03 Inactive
@fritz-c fritz-c merged commit f3fd6f7 into main Sep 22, 2022
@fritz-c fritz-c deleted the fix/theme-backdrop-style-overrides branch September 22, 2022 14:37
@github-actions github-actions bot mentioned this pull request Sep 22, 2022
@github-actions github-actions bot mentioned this pull request Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

What is the correct way to replace the backdrop color?

2 participants