|
59 | 59 | }
|
60 | 60 |
|
61 | 61 | :host(.menu-side-start) .menu-inner {
|
| 62 | + /** |
| 63 | + * Menu does not cover the whole screen so we need to set the safe area for the |
| 64 | + * side that touches the screen edge only. Since safe area is not logical, it |
| 65 | + * needs to be applied to the correct side depending on the language direction. |
| 66 | + * Otherwise, the content will have less space on both sides. |
| 67 | + * |
| 68 | + * LTR: |
| 69 | + * The left side of the menu touches the screen edge. The safe area padding has |
| 70 | + * already been set in the core styles, so there's no need to set it again. |
| 71 | + * The right side of the menu is not touching the screen edge. Padding is not |
| 72 | + * applied to the right side of the menu. A value of 0 is set. |
| 73 | + */ |
62 | 74 | --ion-safe-area-right: 0px;
|
63 | 75 |
|
64 | 76 | @include position(0, auto, 0, 0);
|
| 77 | + |
| 78 | + @include rtl() { |
| 79 | + /** |
| 80 | + * Menu does not cover the whole screen so we need to set the safe area for the |
| 81 | + * side that touches the screen edge only. Since safe area is not logical, it |
| 82 | + * needs to be applied to the correct side depending on the language direction. |
| 83 | + * Otherwise, the content will have less space on both sides. |
| 84 | + * |
| 85 | + * RTL: |
| 86 | + * The right side of the menu touches the screen edge. The safe area padding has |
| 87 | + * already been set in the core styles, so there's no need to set it again. |
| 88 | + * The left side of the menu is not touching the screen edge. Padding is not |
| 89 | + * applied to the left side of the menu. A value of 0 is set. |
| 90 | + */ |
| 91 | + --ion-safe-area-right: env(safe-area-inset-right); |
| 92 | + --ion-safe-area-left: 0px; |
| 93 | + } |
65 | 94 | }
|
66 | 95 |
|
67 | 96 | :host(.menu-side-end) .menu-inner {
|
| 97 | + /** |
| 98 | + * Menu does not cover the whole screen so we need to set the safe area for the |
| 99 | + * side that touches the screen edge only. Since safe area is not logical, it |
| 100 | + * needs to be applied to the correct side depending on the language direction. |
| 101 | + * Otherwise, the content will have less space on both sides. |
| 102 | + * |
| 103 | + * LTR: |
| 104 | + * The right side of the menu touches the screen edge. The safe area padding has |
| 105 | + * already been set in the core styles, so there's no need to set it again. |
| 106 | + * The left side of the menu is not touching the screen edge. Padding is not |
| 107 | + * applied to the left side of the menu. A value of 0 is set. |
| 108 | + */ |
68 | 109 | --ion-safe-area-left: 0px;
|
69 | 110 |
|
70 | 111 | @include position(0, 0, 0, auto);
|
| 112 | + |
| 113 | + @include rtl() { |
| 114 | + /** |
| 115 | + * Menu does not cover the whole screen so we need to set the safe area for the |
| 116 | + * side that touches the screen edge only. Since safe area is not logical, it |
| 117 | + * needs to be applied to the correct side depending on the language direction. |
| 118 | + * Otherwise, the content will have less space on both sides. |
| 119 | + * |
| 120 | + * RTL: |
| 121 | + * The left side of the menu touches the screen edge. The safe area padding has |
| 122 | + * already been set in the core styles, so there's no need to set it again. |
| 123 | + * The right side of the menu is not touching the screen edge. Padding is not |
| 124 | + * applied to the right side of the menu. A value of 0 is set. |
| 125 | + */ |
| 126 | + --ion-safe-area-left: env(safe-area-inset-left); |
| 127 | + --ion-safe-area-right: 0px; |
| 128 | + } |
71 | 129 | }
|
72 | 130 |
|
73 | 131 | ion-backdrop {
|
|
0 commit comments