question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] pre-defined layout: scrollable <main>

See original GitHub issue

I would like to be able to add a property to some tag in the pre-defined layout structure to allow only content inside the the

    <main>
      <v-container fluid>
        <router-view></router-view>
      </v-container>
    </main>

hierarchy to be vertically scrolled.

For instance, in order to achieve the following effect (no full page scroll, I want toolbar and footer always visible), https://imgur.com/GrUKo7E

I need to add custom css:

  html {
    overflow: hidden;
  }

  body {
    overflow: hidden;
  }

  .application {
    height: 100%;
  }

  main {
    height: calc(100% - 56px - 36px);
  }

  .container {
    height: 100%;
    overflow: auto;
  }

I’ve had to repeat this twice already in separate applications when I can see this as being a really common use case.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:11
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

5reactions
dakshshah96commented, Sep 10, 2019

@johnleider With the release of 2.0, what is the right way of making my content in a router-view surrounded by a fixed layout scrollable?

I’ve always felt that I resort to “hacks” like targeting the html or body tags. Would love to know the correct way to do this if you have the time.

<v-app>
    <v-navigation-drawer app temporary v-model="showNavigation">
        <v-list dense nav class="pt-5">
            <v-list-item v-for="item in items" :key="item.title" link class="mb-3">
                <v-list-item-content>
                    <router-link :to="item.link">
                        <div class="title">{{ item.title }}</div>
                    </router-link>
                </v-list-item-content>
            </v-list-item>
        </v-list>
    </v-navigation-drawer>

    <v-app-bar color="black" dark>
        <v-app-bar-nav-icon @click.stop="showNavigation = !showNavigation"></v-app-bar-nav-icon>
        <v-toolbar-title>{{ currentNav }}</v-toolbar-title>
    </v-app-bar>

    <v-content>
        <router-view></router-view>
    </v-content>
</v-app>
4reactions
KaelWDcommented, Nov 27, 2017

This is very easy to do with custom css, but also hard to do in a way that will work at a framework level. I’m going to agree with @sindrepm on this.
Here’s how simple it is: https://codepen.io/anon/pen/bYxpge
Note that menus will not work as expected with this setup due to #795

@tommie - Dialogs do handle scrolling themselves, and you can use the scrollable prop to have fixed header and actions regions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Show scroll bar in published prototypes – Adobe XD Feedback
When you share a prototype with a client, it isn't immediately obvious that the design is scrollable. I have had a couple of...
Read more >
overscroll-behavior - CSS: Cascading Style Sheets | MDN
The overscroll-behavior CSS property sets what a browser does when reaching the boundary of a scrolling area.
Read more >
Prototype scrolling with overflow behavior - Figma Help Center
Users on any team or plan can use scrolling overflow in their prototypes. Anyone with can edit access to a file can create...
Read more >
Lists and grids | Jetpack Compose - Android Developers
If you know that your use case does not require any scrolling, you may wish to use a ... Lazy layouts provide the...
Read more >
ScrollViewer Overview - WPF .NET Framework - Microsoft Learn
There are two predefined elements that enable scrolling in WPF ... For layout controls that natively support logical scrolling, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found