All files / src/components AppMain.vue

100% Statements 2/2
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55  159x                                                                                                          
<template>
  <main class="main-content">
    <slot />
  </main>
</template>
 
<script setup lang="ts">
// @implements UC-SPACE-015.1
/**
 * The content area of the app's frame, between the fixed header (and
 * ribbons) and the menu (AppNavRail): on the right of the menu on a computer,
 * above it on a phone. Shared by the app and the space (UC-SPACE-015.1).
 */
</script>
 
<style scoped>
.main-content {
  margin-left: 125px;
  margin-top: calc(74px + var(--bw-ribbons-height, 0px));
  padding: 0;
  height: calc(100vh - 74px - var(--bw-ribbons-height, 0px));
  height: calc(100dvh - 74px - var(--bw-ribbons-height, 0px));
  display: flex;
  flex-direction: column;
  width: calc(100% - 125px);
  max-width: calc(100% - 125px);
  box-sizing: border-box;
  background: var(--bw-main-content-bg);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
 
/* Mobile layout */
@media (max-width: 767px) {
  /* Pinned between the header and the 60px bottom nav rather than sized with
     a viewport unit: 100vh ignores the browser URL bar and 100dvh lags behind
     it while it animates, both leaving content out of reach or a gap showing
     the page background above the nav. */
  .main-content {
    position: fixed;
    top: calc(62px + var(--bw-ribbons-height, 0px));
    bottom: 60px;
    left: 0;
    right: 0;
    margin: 0;
    height: auto;
    width: auto;
    max-width: none;
    /* Reaching the end of the content must not scroll or bounce the page behind it */
    overscroll-behavior: contain;
  }
}
</style>