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

.badge within .btn-primary within .panel-default>.panel-heading using wrong style #16057

Closed
colincameron opened this issue Mar 13, 2015 · 2 comments

Comments

@colincameron
Copy link

I have a button inside a panel heading, and the button has a badge on it. The badge is being styled based on being inside the panel heading rather than based on being inside the button, i.e. this rule:

.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}

is taking precedence over this rule:

.btn-primary .badge{color:#337ab7;background-color:#fff}

This is causing my badge to look like this:

screenshot 2015-03-13 12 32 53

Code example here.

Of course, I can add the correct colour styling manually to the span to solve my immediate problem, but I would suggest that the styles for badges within button types are moved to later in the CSS file than the styles for badges within panel headers.

@cvrebert cvrebert added the css label Mar 13, 2015
@zacechola
Copy link

This is related to discussions in issue #13686 and PR #13687.

@mdo
Copy link
Member

mdo commented Mar 27, 2015

We can't really scope these styles any better. If we scope them with a > selector to make things more specific and prevent this inheritance, we screw up folks' implementations where they have even a single wrapping element around those badges.

Not sure we can address this in v3, so punting for now. Holler if anyone has any ideas though, save for overriding things one more time just for buttons.

@mdo mdo closed this as completed Mar 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants