Skip to content

Commit

Permalink
feat(backdrop): ionic theme styles (#29873)
Browse files Browse the repository at this point in the history
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

No Ionic theme styles for the `ion-backdrop` element

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

Adds Ionic theme styles for `ion-backdrop` and updates snapshots.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

The backdrop changes were only applied to `ion-modal` for now as all
other components where `ion-backdrop` is used do not yet have dedicated
Ionic theme styles. This is relevant as those components will need to
set `--backdrop-opacity: <value>` for their own implementations.
  • Loading branch information
tanner-reits authored Sep 17, 2024
1 parent 60e6b31 commit a37098e
Show file tree
Hide file tree
Showing 24 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions core/src/components/backdrop/backdrop.ionic.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@use "../../themes/ionic/ionic.globals.scss" as globals;
@import "./backdrop";

:host {
background-color: rgba(globals.$ionic-color-base-black-rgb, 0.7);
backdrop-filter: blur(2px);
}
2 changes: 1 addition & 1 deletion core/src/components/backdrop/backdrop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { getIonTheme } from '../../global/ionic-global';
styleUrls: {
ios: 'backdrop.ios.scss',
md: 'backdrop.md.scss',
ionic: 'backdrop.md.scss',
ionic: 'backdrop.ionic.scss',
},
shadow: true,
})
Expand Down
4 changes: 4 additions & 0 deletions core/src/components/modal/modal.ionic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
// Ionic Modal
// --------------------------------------------------

:host {
--backdrop-opacity: 1;
}

// Shape
// -------------------------------------
:host(.modal-round) {
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.

0 comments on commit a37098e

Please sign in to comment.