Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vuetify v-flex xs12 only fill half the width

I am trying to make list of cards using vuetify v-flex here is the code

    <div id="app">
    <v-app>
    <v-content>
        <v-container fill-height fluid>
        <v-layout>
            
            <v-flex xs12>
            <v-card dark color="grey">
                <v-card-title>
                <div>
                    <h2>Top Questions</h2>
                </div>
                </v-card-title>
            </v-card>
            </v-flex>
            
            <v-flex xs12>
            <v-card v-for="item in items" :key="item._id">
                <v-card-title>
                <h3>{{ item.title }}</h3>
                <p>{{ item.content }}</p>
                </v-card-title>
            </v-card>
            </v-flex>
        </v-layout>        
        </v-container>
    </v-content>
    </v-app>
</div> 

I am expecting each v-flex will fill 100% of the row. However, they only filled half of it.
https://codepen.io/anon/pen/mKBMEW

I can, however, add prop d-inline-block at v-layout. I am just curious about what happened with my first code before.

like image 891
Restu Utomo Avatar asked Jun 15 '18 15:06

Restu Utomo


People also ask

How to make the V-container full width with vuetify?

To make the v-container full width with Vuetify, we just add the fluid prop. to add the fluid prop to the v-container to make it fill the width of the v-content component. To make the v-container full width with Vuetify, we just add the fluid prop.

How does $vuetify work with nuxt?

While the $vuetify object supports SSR (Server-Side Rendering) including platforms such as NUXT, the breakpoint service detects the height and width values as 0. This sets the initial breakpoint size to xs and in some cases can cause the layout to snap in place when the client side is hydrated in NUXT.

How does vuetify grid breakpoint work?

The breakpoint and conditional values return a boolean that is derived from the current viewport size. Additionally, the breakpoint service mimics the Vuetify Grid naming conventions and has access to properties such as xlOnly, xsOnly, mdAndDown, and others.

What is 12 point grid system vuetify?

Grid system Vuetify comes with a 12 point grid system built using flexbox. The grid is used to create specific layouts within an application’s content. It contains 5 types of media breakpoints that are used for targeting specific screen sizes or orientations, xs, sm, md, lg and xl.


2 Answers

When I used Ikbel's column solution, my flex-components max-width was overwritten to always be 100%. What I did is give row wrap attributes to v-layout.

like image 97
brawlz Avatar answered Sep 28 '22 10:09

brawlz


I think you need to add column attribute to v-layout.

like image 45
Ikbel Avatar answered Sep 28 '22 10:09

Ikbel