UserDeveloper
UserDeveloper

Reputation: 68

Set font family & size in ag-grid v25 angular 10

How do I set the font and it's size in ag-grid (angular) I am using ag-grid version 25 in angular 10. I tried setting up the font in the wrapper container (div) and tag but nothing worked so far.

.wrapper-container {
   font-size : 10px;
   font-family : "Open Sans";
}

and

ag-grid-angular {
   font-size : 10px;
   font-family: "Open Sans";
}

Upvotes: 3

Views: 4435

Answers (1)

Ranjith Bhaskaran
Ranjith Bhaskaran

Reputation: 243

If you're using any theme, you can set the font family in the styles.scss using the theme class

.ag-theme-alpine {
  font-family: "Open Sans", sans-serif;
}

also, the font-size can be set in custom class within the ag-grid-angular tag.

<ag-grid-angular 
   class="ag-theme-alpine custom-class" .... >
</ag-grid-angular>

in custom-class set your font-size

.custom-class {
   font-size : 10px
}

Upvotes: 4

Related Questions