mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
fix(modal): border radius is now correctly applied to card modals (#24204)
This commit is contained in:
@ -65,17 +65,6 @@ html.ios ion-modal ion-toolbar {
|
||||
padding-left: calc(var(--ion-safe-area-left) + 8px);
|
||||
}
|
||||
|
||||
/**
|
||||
* .ion-page needs to explicitly set
|
||||
* the border radius in WebKit otherwise
|
||||
* modals will not show border radius properly.
|
||||
* Do not use inherit as that will not
|
||||
* work with shadow dom in this case.
|
||||
*/
|
||||
html.ios ion-modal .ion-page {
|
||||
border-radius: 10px 10px 0 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Card style modal on iPadOS
|
||||
* should only have backdrop on first instance.
|
||||
@ -110,6 +99,20 @@ ion-modal:not(.overlay-hidden) ~ ion-modal {
|
||||
--box-shadow: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* This works around a bug in WebKit where the
|
||||
* content will overflow outside of the bottom border
|
||||
* radius when re-painting. As long as a single
|
||||
* border radius value is set on .ion-page, this
|
||||
* issue does not happen. We set the top left radius
|
||||
* here because the top left corner will always have a
|
||||
* radius no matter the platform.
|
||||
* This behavior only applies to card modals.
|
||||
*/
|
||||
html.ios ion-modal.modal-card .ion-page {
|
||||
border-top-left-radius: var(--border-radius);
|
||||
}
|
||||
|
||||
// Ionic Colors
|
||||
// --------------------------------------------------
|
||||
// Generates the color classes and variables based on the
|
||||
|
Reference in New Issue
Block a user