Change font family globally for angular app

ios
android

#1

I want to change my default app font with Roboto font.
Is there any option to do that globally, not page by page?


#2

It’s matter of CSS selector, if you want the whole app to follow one particular font just place a wild card selector in app.css

* {
 font-family: Your font-family;
}

#3

Sometimes the simple solution is the hardest one to think of :smiley:


#4

This doesn’t work for me I’m afraid.


#5

If you have it in app.css it should work.


#6

I’m using Nativescript with Angular and SCSS but don’t seem to have an app.scss or app.css file.

I have the following though, none of which work when using the asterisk selector:

  • app.common.scss
  • app.android.scss
  • app.ios.scss
  • app.component.scss
  • app.component.android.scss
  • app.component.ios.scss

#7

Put it in common scss.


#8

I’ve tried this but it still doesn’t work for some reason.


#9

Just make sure none of your CSS rules overrides this wildcard selector.