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

An <hx class=".panel-title"> should inherit color from .panel-heading #11544

Closed
maniqui opened this issue Nov 19, 2013 · 4 comments
Closed

An <hx class=".panel-title"> should inherit color from .panel-heading #11544

maniqui opened this issue Nov 19, 2013 · 4 comments
Labels
Milestone

Comments

@maniqui
Copy link

maniqui commented Nov 19, 2013

The class .panel-title, which is usually applied to a heading element (<hx class="panel-title">) doesn't inherit the color defined for .panel-heading, which is defined in this rule:

.panel-primary > .panel-heading {
  color: #ffffff;
}

Instead, it currently inherits its color from the one defined in the rule h1, h2, h3..., .h1, .h2, .h3... {}.

My opinion is that the .panel-title class should inherit its color from .panel-heading class.

The change is simple. In panels.less, do:

.panel-title {
  margin-top: 0;
  margin-bottom: 0;
+  color:inherit;
  font-size: ceil((@font-size-base * 1.125));
  > a {
    color: inherit;
  }
}

Sorry for not submitting a proper patch or a pull request. I'm a bit short of time right now.

@zlatanvasovic
Copy link
Contributor

Looks fine for me, I can't reproduce an issue.

@carasmo
Copy link

carasmo commented Nov 20, 2013

@maniqui : thanks!

I could reproduce this because I'm defining a color for

@headings-color:          #000;

instead of inherit which is the default. If inherit is used, then it works fine, if you define a color, then the panel titles are the @headings-color not the @panel-primary-text, etc color.

also, if you change the order in type.less to put the emphasis classes after the h1, .h1 - h6, .h6 then h1.text-primary and so on will be the colors you want and also not the @headings-color

@mdo mdo closed this as completed in 21e2ae9 Nov 30, 2013
@mdo
Copy link
Member

mdo commented Nov 30, 2013

@carasmo I checked this out locally and the fix described in the opening comment works fine for this. The problem you're describing though is resolved in #11515 (by your solution). Thanks! <3

@mdo mdo mentioned this issue Nov 30, 2013
@carasmo
Copy link

carasmo commented Dec 1, 2013

Cool!

stempler pushed a commit to stempler/bootstrap that referenced this issue Apr 11, 2014
…e proper text color when customizing @headings-color
stempler pushed a commit to stempler/bootstrap that referenced this issue Nov 4, 2014
…e proper text color when customizing @headings-color
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants