I use v-text-field, and v-select, with vue-loader.
I tried to change font-size, but I could not.
How Do I change font-size?
My code likes this.
<template lang="pug">
p label-1
v-text-field(...)
p label-1
v-text-field(...)
</template>
<stylelang="sass">
.input-group .input-group__input
font-size: 12px !important
</style>
<stylelang="sass"scoped>
.p
font-size: 12px
</style>
developer tool screenshot
To change the default font in Vuetify, we can set the font-family CSS property in the global styles. to set the font-family value to $font-family , which is set to 'Ubuntu' . Now our Vuetify app will use Ubuntu as the default font.
Vuetify. js uses the Material Design spec Roboto Font. Each heading size also has a corresponding helper class to style other elements the same.
Customizing. By default, Vuetify has a standard theme applied for all components. This can be easily changed. Simply pass a theme property to the Vuetify constructor.
You can use text-wrap / text-no-wrap class. Show activity on this post. The solution for my scenario was adding word-break: break-word; to my class. The built in classnames did not do what I needed.
To change the font size for a single component, such as a text field
, application-wide:
<style>
.v-text-field input {
font-size: 1.2em;
}
</style>
To change the font size within another component, use a scoped style:
<style scoped>
.v-text-field input {
font-size: 1.2em;
}
</style>
For a more generic approach, you can also target multiple component types using .v-input
.v-input {
font-size: 1.2em;
}
or
.v-input input {
font-size: 1.2em;
}
Finally, you can also target the labels as well.
.v-input .v-label {
font-size: 1.2em;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With