Note about stacking modals is not complete

Open
#2,154 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
38/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
css
Domain
documentation

Research direction

Open the ion-modal API documentation page linked in the issue and review the note and CSS example for stacking modals. Verify the documented styles against Ionic's current behavior, then update the note so it accurately explains the styling needed for a darker backdrop.

Written by the indexing model from the issue text.

Description

content

In the docs of the ion-modal (https://ionicframework.com/docs/api/modal), I found a note about adding CSS in order to darken the background of stacking modals:

ion-modal.stack-modal {
  --box-shadow: 0 28px 48px rgba(0, 0, 0, 0.4);
  --backdrop-opacity: var(--ion-backdrop-opacity, 0.32);
}

I noticed that this CSS gets overwritten by styles of Ionic. It was necessary to add !important to the custom styles above in order to make a backdrop getting darker with multiple modals.

Dominant language
MDX
Stars
621
Forks
3.2k
Avg merge
1d 2h
Merged PRs (30d)
86

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ionic-team/ionic-docs

All issues in ionic-team/ionic-docs

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.