-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
Remove color: inherit from headings #11518
Conversation
This CSS rule overrides <a> tag color styling as well as .text-* class color styling.
Removing a variable breaks backwards compatibility, and we can't do that until Bootstrap v4. |
Was intended to fix #11515. |
Ah... yup... my bad. Any chance we can still consider this fix if I simply add back the @headings-color variable so that we're not breaking backward compatibility? I can submit another pull request with only that one line change in type.less if you'd like... |
@dzwillia That one line is the only place that that variable is used! Removing all usages of a variable obviously breaks backward compatibility. |
Removing the usage of a variable in one spot (whether it is the only spot At this point, there is no clear case to why color: inherit was even added On Mon, Nov 18, 2013 at 2:41 PM, Chris Rebert [email protected]:
|
It ultimately comes down to backwards compatibility. We do want to eventually fix this, it's just that backwards compatibility restricts us from fixing this in any backwards-incompatible way until v4. |
".h1-.h6 classes should be used to maintain the semantically appropriate heading levels - NOT for use on non-headings...." The .h1-.h6 are from the Object-Oriented CSS project and you're not supposed to use them on links and p tags, just other headings. I read something here, on this forum, from @modo I think about 1 or two months ago. So keep the color inherit, they are supposed to match. I use them as intended all the time. |
Besides stick the Emphasis & misc after the .h1-.h6 in type.less and it will work correctly, pretty much, just add a.h1-a.h6 and you can get what you want, I think.
|
Heading classes (
.h1
,.h2
, etc.) override default color styling for anchor tags as well as other well-defined classes for color styling (.text-success
,.text-danger
, etc.).The following code snippet when rendered would appear with
@text-color
(instead of@link-color
) until hovered over at which point it would appear with@link-hover-color
color.It should be noted that this styling was correct shortly ago in BS 3.0.0. I have included two examples to document the issue:
Bootstrap 3.0.0 (styled correctly): http://jsfiddle.net/MYrV4/3/
Bootstrap 3.0.2 (styled incorrectly): http://jsfiddle.net/5g7WH/2/
Heading classes (which are simply meant to emulate their respective heading sizes) should not affect the color of anchor elements nor elements with the .text-* classes.
While related to Issue #10202, I view this to be a far more grievous issue than it as it is more far-reaching (affecting styling all the way down to basic anchor tag styling).