css - How to add custom styles to material components without breaking anything -
i using vuejs vuetify material design support vuejs, confused how can add custom css styles material design without breaking convention of material design itself.
it bootstrap can call .row{}
, override styling or differ in ways.
i don't think there're many differences bootstrap since vuetify automatically add necessary class names you. suppose want override background color of following template.
<v-layout row justify-space-around></v-layout>
just override .row
.row { background: #123456; }
check sample below.
new vue({ el: '#app' })
.row { background: #123456; } .theme--dark { width: 400px; } .card__text { font-weight: 800; }
<script src="https://unpkg.com/vue/dist/vue.min.js"></script> <script src="https://unpkg.com/vuetify/dist/vuetify.js"></script> <link href="https://unpkg.com/vuetify/dist/vuetify.min.css" rel="stylesheet"> <div id="app"> <v-app> <main> <v-layout row justify-space-around> <v-card dark class="primary"> <v-card-text>one</v-card-text> </v-card> </v-layout> </main> </v-app> </div>
please notice -
converted __
(e.g. v-card-text
) , theme--
prepended theme's name (e.g. dark
).
Comments
Post a Comment