Reputation: 103
I am having trouble getting the ink bar to be hidden. I have tried a multitude of different things, but with no success. Here is the CSS I currently have, which does change the color of the ink-bar. I wish to disable and hide it completely to remove the border shadow.
/* active tab ink bar */
::ng-deep .mat-ink-bar {
background-color: var(--primary-color,$orange) !important;
display: none !important;
visibility: hidden !important;
transition: none !important;
height: 0px !important;
width: 0px !important;
}
Upvotes: 5
Views: 12067
Reputation: 1
/* header */
::ng-deep.mat-tab-group .mat-tab-header, .mat-tab-nav-bar .mat-tab-header{
border-bottom: none;
}
/* ink bar style */
::ng-deep.mat-tab-group .mat-ink-bar, .mat-tab-nav-bar .mat-ink-bar{
display: none !important;
}
Upvotes: 0
Reputation: 176
Since Angular (Material) 15 mat-ink-bar has been renamed. I was able to remove it with the following snippet in global scss:
.mdc-tab-indicator__content {
display: none;
}
Upvotes: 7
Reputation: 49
I'm also facing the same issue, I have fixed like this
/* header */
::ng-deep.mat-tab-group .mat-tab-header, .mat-tab-nav-bar .mat-tab-header{
border-bottom: none;
}
/* ink bar style */
::ng-deep.mat-tab-group .mat-ink-bar, .mat-tab-nav-bar .mat-ink-bar{
display: none !important;
}
Upvotes: 1
Reputation: 117
I had the same issue in changing the active tab style i fixed it using the below style.
:host ::ng-deep .mat-tab-label {
height: 3rem !important;
min-width: 8rem !important;
}
/* Styles for the active tab label */
:host ::ng-deep .mat-tab-label.mat-tab-label-active {
border: 1px solid #2F80ED;
box-sizing: border-box;
border-radius: 0.8rem;
}
/* Styles for the ink bar */
:host ::ng-deep .mat-ink-bar {
display: none !important;
}
Upvotes: 7