Skip to content

Commit 3a79743

Browse files
committed
refactor(modal): add comments
1 parent 30e2d8b commit 3a79743

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

core/src/components/modal/modal.ios.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@
8888
@include border-radius(var(--border-radius), var(--border-radius), 0, 0);
8989
}
9090

91+
// iOS Sheet Modal - Scroll at all breakpoints
92+
// --------------------------------------------------
93+
9194
/**
9295
* Sheet modals require an additional padding as mentioned in the
9396
* `core.scss` file. However, there's a workaround that requires
@@ -96,6 +99,6 @@
9699
* It's important to update the padding value when the core styles are
97100
* updated.
98101
*/
99-
:host(.modal-sheet.modal-scroll-all) ion-footer ion-toolbar:first-of-type {
102+
:host(.modal-sheet.modal-scroll-all) ion-footer ion-toolbar:first-of-type {
100103
padding-top: 6px;
101104
}

core/src/css/core.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ body.backdrop-no-scroll {
5151
* the first toolbar in the header.
5252
* Footer also needs this. We do not adjust the bottom
5353
* padding though because of the safe area.
54+
*
55+
* There is a workaround to allow sheet modals to scroll
56+
* at any breakpoint. This requires the footer to be
57+
* cloned. However, the following styles are not applied.
58+
* This is fixed by adding the styles directly on the
59+
* modal iOS file. If this padding value is updated, then
60+
* the value also needs to be updated in the modal iOS file.
5461
*/
5562
html.ios ion-modal.modal-card ion-header ion-toolbar:first-of-type,
5663
html.ios ion-modal.modal-sheet ion-header ion-toolbar:first-of-type,

0 commit comments

Comments
 (0)