Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: I want to change the global font-family.

박진호 priority asked 1 year ago


I want to change the global font-family.
I am using scss for mdb vite.
I've tried several things, but it doesn't change well.
How can I modify font-family variable in "mdb-vue-ui-kit" in my project?
Any help please?

When set in index.html or style.css
No changes are made to the MBDCalendarApp component.
How can I change the font-family of mdb-vue-ui-kit?

Bartosz Cylwik staff answered 1 year ago


Hi! Try changing the --mdb-body-font-family css variable value inside your css/scss file. Remember that the css/scss file should be imported after importing mdb-vue-ui-kit css file.

For example: index.html

<head>
  ...
  <link href="https://fonts.googleapis.com/css2?family=Montserrat&display=swap" rel="stylesheet">
  ...
</head>

index.scss

:root {
  --mdb-body-font-family: Montserrat, Helvetica, Arial, sans-serif;
}

Best Regards!



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Vue
  • MDB Version: MDB5 3.2.0
  • Device: desktop
  • Browser: chrome
  • OS: win10
  • Provided sample code: No
  • Provided link: No