Skip to content

Commit f424e2b

Browse files
authored
Layout pages: Safe area fixes & related code improvements (#2959)
Signed-off-by: Florian Hotze <[email protected]>
1 parent 0706f3a commit f424e2b

File tree

3 files changed

+4
-19
lines changed

3 files changed

+4
-19
lines changed

bundles/org.openhab.ui/web/src/components/widgets/standard/oh-card.vue

-9
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,6 @@
2323
</f7-card>
2424
</template>
2525

26-
<style lang="stylus">
27-
// Fix safe-area issues where oh-card is used inside a block or masonry layout, where the safe areas are already respected by the parent block
28-
.oh-col >
29-
.oh-masonry-item >
30-
.oh-card
31-
margin-left var(--f7-card-margin-horizontal)
32-
margin-right var(--f7-card-margin-horizontal)
33-
</style>
34-
3526
<script>
3627
import mixin from '../widget-mixin'
3728
import { actionsMixin } from '@/components/widgets/widget-actions'

bundles/org.openhab.ui/web/src/css/app.styl

+1-9
Original file line numberDiff line numberDiff line change
@@ -322,13 +322,5 @@ html
322322
.item-inner
323323
padding-right var(--f7-list-item-padding-horizontal)
324324

325-
// Fix safe area issues with oh-cell components, where safe areas are already respected by the wrapping oh-block
326-
.oh-cell
327-
margin-top var(--f7-card-expandable-margin-vertical)
328-
margin-bottom var(--f7-card-expandable-margin-vertical)
329-
margin-left var(--f7-card-expandable-margin-horizontal)
330-
margin-right var(--f7-card-expandable-margin-horizontal)
331-
332-
// Fix safe area issues inside block-narrow, where safe areas are already respected by the wrapping block-narrow
333-
// Fix is in nomini.css due to CssMinimizerPlugin minimizing app.styl and removing the unit px from 0px,
325+
// Additional safe area fixes are in nomini.css due to CssMinimizerPlugin minimizing app.styl and removing the unit px from 0px,
334326
// which breaks calculcations using the overwritten CSS variables.

bundles/org.openhab.ui/web/src/css/nomini.css

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/* CSS that shouldn't get minimized */
22
/* e.g. due to CssMinimizerPlugin removing unit from 0px, which breaks calculations */
3-
.block-narrow {
3+
4+
/* Fix safe area issues inside block-narrow, oh-grid-cells, oh-grid-row & oh-masonry, where safe areas are already respected by component or its parents itself */
5+
.block-narrow, .oh-cell, .oh-row, .oh-masonry-item {
46
--f7-safe-area-left: 0px;
57
--f7-safe-area-outer-left: 0px;
68
--f7-safe-area-right: 0px;

0 commit comments

Comments
 (0)