Rohan Jalil Rohan Jalil - 1 month ago 11
CSS Question

Want to change Font-family of whole app

I'm working on Extjs 6.0.2
We were using Arial font in our app (I guess it was by default font from sencha)
Now we want to change it to 'open-sans'
Where we have to change.?

I tried to add

.* ,.x-body , .x-panel-body-startPageItem, .x-panel-body-default {
font-family: 'Open Sans', sans-serif !important;

In Project/packages/MyApp/sass/src/MyApp/view/MainView.scss, But it changes fonts only on the landing page
This works but I have to add all the classes one by one where I have to show this style like I added above .x-panel-body-startPageItem,.x-panel-body-default
Tried this thing to=>
Added this in project/resources/css/MyApp.css, But no use

.* {
font-family: 'Open Sans' !important;

Will you please help me

Answer Source

Instead of

.* { font-family: 'Open Sans' !important; }

use this

* {
    font-family: 'Open Sans' !important;

because .* doesn't work as you would expect, where just * targets everything, or you can as well use:

html { font-family: 'Open Sans' !important; }

Hope this helps!