Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tabs customization #5014

Closed
sedestrian opened this issue Jun 7, 2017 · 4 comments · Fixed by #5287
Closed

tabs customization #5014

sedestrian opened this issue Jun 7, 2017 · 4 comments · Fixed by #5287
Assignees
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions

Comments

@sedestrian
Copy link

Bug, feature request, or proposal:

Tabs cannot be customized to have a different background, ripple, bottom bar and text color or it's not clear how to do it

What is the expected behavior?

have a way to change the colors

What is the current behavior?

can't find a way to do it

What are the steps to reproduce?

using a md-tab-group results in a white background not a colored one with white text, how to change?

Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: http://embed.plnkr.co/o077B6uEiiIgkC0S06dd/

What is the use-case or motivation for changing an existing behavior?

customization

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 4, Material: latest

Is there anything else we should know?

No

@jelbourn jelbourn added feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions labels Jun 7, 2017
@m0nzderr
Copy link

m0nzderr commented Jun 8, 2017

+1

@leocaseiro
Copy link
Contributor

leocaseiro commented Jun 21, 2017

For the time being, you can use plain CSS to customize it.

Make sure you remove encapsulation from your component with ViewEncapsulation.None

Here are some selectors you can customize:

md-tab-group {
  background-color: pink;
}
.mat-tab-body-wrapper {
  color: white;
  background-color: red;
}
.mat-tab-label.mat-tab-label-active {
  background-color: #3f51b5;
}

You can see in action on this plunker: https://plnkr.co/edit/2vHN2xnb4I25cYMusapQ?p=preview

PS: You should be able to customise within your theme using SASS

@chriszrc
Copy link

@kara So can we set background color individually on tabs now? Doesn't seem to work on 8.0.0-rc.0

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants