Change CSS Style of Grid Buttons
Question
How do I change the CSS styling for each of the grid buttons that display (top right) of grid?
I would like to change the css styling of each button from "flat" to "raised", the background color and text color of each button, and maybe the size of each button.
Examples Column Pinning Button Column Hiding Button Export to Excel Button
- igniteui-angular version: 8.0.0
- browser: Google Chrome
@rmkrmk This is not related to styling, rather, the question asks how do 'we' change the encapsulated button type from 'raised' to 'flat'.
Actually the question is also about changing size, background and text color.
@brookhutchinson, currently the IgxGrid and the toolbar does not support altering of the directives (or their parameters) applied to the toolbar buttons (i.e. it is not be possible to change the buttons from flat to raised).
@brookhutchinson When it comes to styling the encapsulated buttons, you can always use the igx-button-theme mixin.
In your component styles file, do something like:
$toolbar-btn: igx-button-theme(
$raised-resting-shadow: none,
$raised-hover-shadow: none,
$raised-focused-shadow: none,
$raised-background: transparent
);
:host::ng-deep {
@include igx-button($toolbar-btn);
}
This should pretty much make the raised button similar in styles to the flat one.
There are plenty more theme properties on the raised button you can change to make it just how you want. Take a look at the documentation.
@rmkrmk I think it's useful if we expose the button types as inputs.