|
1 |
| - |
2 | 1 | /**
|
3 | 2 | * Platform
|
4 | 3 | * --------------------------------------------------
|
|
12 | 11 | &:not(.fullscreen) {
|
13 | 12 | .bar-header:not(.bar-subheader) {
|
14 | 13 | height: $bar-height + $ios-statusbar-height;
|
| 14 | + height: calc(constant(safe-area-inset-top) + #{$bar-height}); |
| 15 | + height: calc(env(safe-area-inset-top) + #{$bar-height}); |
15 | 16 |
|
16 | 17 | &.item-input-inset .item-input-wrapper {
|
17 | 18 | margin-top: 19px !important;
|
18 | 19 | }
|
19 | 20 |
|
20 | 21 | > * {
|
21 | 22 | margin-top: $ios-statusbar-height;
|
| 23 | + margin-top: constant(safe-area-inset-top); |
| 24 | + margin-top: env(safe-area-inset-top); |
| 25 | + } |
| 26 | + } |
| 27 | + .bar-header { |
| 28 | + padding-left: calc( |
| 29 | + constant(safe-area-inset-left) + #{$bar-padding-portrait} |
| 30 | + ); |
| 31 | + padding-left: calc(env(safe-area-inset-left) + #{$bar-padding-portrait}); |
| 32 | + padding-right: calc( |
| 33 | + constant(safe-area-inset-right) + #{$bar-padding-portrait} |
| 34 | + ); |
| 35 | + padding-right: calc( |
| 36 | + env(safe-area-inset-right) + #{$bar-padding-portrait} |
| 37 | + ); |
| 38 | + |
| 39 | + .buttons:last-child { |
| 40 | + right: calc(constant(safe-area-inset-right) + #{$bar-padding-portrait}); |
| 41 | + right: calc(env(safe-area-inset-right) + #{$bar-padding-portrait}); |
22 | 42 | }
|
23 | 43 | }
|
24 |
| - .tabs-top > .tabs, |
25 |
| - .tabs.tabs-top { |
| 44 | + |
| 45 | + .has-tabs, .bar-footer.has-tabs { |
| 46 | + bottom : calc(constant(safe-area-inset-bottom) + #{$tabs-height}); |
| 47 | + bottom : calc(env(safe-area-inset-bottom) + #{$tabs-height}); |
| 48 | + } |
| 49 | + |
| 50 | + .tabs-top > .tabs, .tabs.tabs-top { |
26 | 51 | top: $bar-height + $ios-statusbar-height;
|
27 | 52 | }
|
28 | 53 |
|
29 |
| - .has-header, |
30 |
| - .bar-subheader { |
| 54 | + .tabs { |
| 55 | + padding-bottom: constant(safe-area-inset-bottom); |
| 56 | + padding-bottom: env(safe-area-inset-bottom); |
| 57 | + height: calc(constant(safe-area-inset-bottom) + 49px); |
| 58 | + height: calc(env(safe-area-inset-bottom) + 49px); |
| 59 | + } |
| 60 | + .has-header, .bar-subheader { |
31 | 61 | top: $bar-height + $ios-statusbar-height;
|
| 62 | + top: calc(constant(safe-area-inset-top) + #{$bar-height}); |
| 63 | + top: calc(env(safe-area-inset-top) + #{$bar-height}); |
32 | 64 | }
|
33 | 65 | .has-subheader {
|
34 | 66 | top: $bar-height + $bar-subheader-height + $ios-statusbar-height;
|
| 67 | + |
| 68 | + top: calc(constant(safe-area-inset-top) + #{$bar-height + $bar-subheader-height}); |
| 69 | + top: calc(env(safe-area-inset-top) + #{$bar-height + $bar-subheader-height}); |
35 | 70 | }
|
36 | 71 | .has-header.has-tabs-top {
|
37 | 72 | top: $bar-height + $tabs-height + $ios-statusbar-height;
|
| 73 | + |
| 74 | + top: calc(#{$bar-height + $tabs-height} + constant(safe-area-inset-top)); |
| 75 | + top: calc(#{$bar-height + $tabs-height} + env(safe-area-inset-top)); |
38 | 76 | }
|
39 | 77 | .has-header.has-subheader.has-tabs-top {
|
40 | 78 | top: $bar-height + $bar-subheader-height + $tabs-height + $ios-statusbar-height;
|
| 79 | + |
| 80 | + top: calc(#{$bar-height + $bar-subheader-height + $tabs-height} + constant(safe-area-inset-right); |
| 81 | + top: calc(#{$bar-height + $bar-subheader-height + $tabs-height} + env(safe-area-inset-right); |
41 | 82 | }
|
42 | 83 | }
|
43 |
| - .popover{ |
| 84 | + .popover { |
44 | 85 | .bar-header:not(.bar-subheader) {
|
45 | 86 | height: $bar-height;
|
46 | 87 | &.item-input-inset .item-input-wrapper {
|
|
50 | 91 | margin-top: 0;
|
51 | 92 | }
|
52 | 93 | }
|
53 |
| - .has-header, |
54 |
| - .bar-subheader { |
| 94 | + .has-header, .bar-subheader { |
55 | 95 | top: $bar-height;
|
56 | 96 | }
|
57 | 97 | .has-subheader {
|
|
64 | 104 | }
|
65 | 105 | }
|
66 | 106 |
|
67 |
| -@media (orientation:landscape) { |
| 107 | +@media (orientation: landscape) { |
| 108 | + .item { |
| 109 | + padding: $item-padding calc(constant(safe-area-inset-right) + #{$item-padding}); |
| 110 | +
|
| 111 | + .badge { |
| 112 | + right: calc(constant(safe-area-inset-right) + 32px) |
| 113 | + } |
| 114 | + } |
| 115 | + .item-icon-left { |
| 116 | + padding-left: calc(constant(safe-area-inset-left) + 54px); |
| 117 | +
|
| 118 | + .icon { |
| 119 | + left: calc(constant(safe-area-inset-left) + 11px); |
| 120 | + } |
| 121 | + } |
| 122 | + .item-icon-right { |
| 123 | + padding-right: calc(constant(safe-area-inset-right) + 54px); |
| 124 | + .icon { |
| 125 | + right: calc(constant(safe-area-inset-right) + 11px); |
| 126 | + } |
| 127 | + } |
| 128 | +
|
| 129 | + .item-complex, a.item.item-complex, button.item.item-complex { |
| 130 | + padding: 0; |
| 131 | +
|
| 132 | + .item-content { |
| 133 | + padding: $item-padding |
| 134 | + calc(constant(safe-area-inset-right) + #{(ceil( ($item-padding * 3) + ($item-padding / 3)) - 5)}) |
| 135 | + $item-padding |
| 136 | + calc(constant(safe-area-inset-left) + #{$item-padding}); |
| 137 | + } |
| 138 | + } |
| 139 | +
|
| 140 | + .item-left-edit.visible.active { |
| 141 | + @include translate3d(calc(constant(safe-area-inset-left) + 8px), 0, 0); |
| 142 | + } |
| 143 | + .list-left-editing .item-left-editable .item-content, |
| 144 | + .item-left-editing.item-left-editable .item-content { |
| 145 | + @include translate3d(calc(constant(safe-area-inset-left) + 50px), 0, 0); |
| 146 | + } |
| 147 | +
|
| 148 | + .item-right-edit{ |
| 149 | + right: constant(safe-area-inset-right); |
| 150 | + right: env(safe-area-inset-right) |
| 151 | + } |
| 152 | +
|
| 153 | +
|
68 | 154 | .platform-ios.platform-browser.platform-ipad {
|
69 | 155 | position: fixed; // required for iPad 7 Safari
|
70 | 156 | }
|
|
0 commit comments