Disabled icons
For example when using <a href="#" class="icon-stop"></a> a stop icon is shown.
But when such an option is visible, but not enabled, it is expected to only adding the disabled class and/or disabled="disabled"attribute to disable it:
<a href="#" class="icon-stop disabled"><a/>
<a href="#" class="icon-stop" disabled="disabled"`></a>
<a href="#" class="icon-stop disabled" disabled="disabled"></a>
Expected is the following:
- Visual difference between "enabled" and "disabled" icons
- Optional: when "disabled" and it is an action element (like
aandbutton), then also alter the cursor
What I currently use (and note that this is not fully cross-browser):
[class^="icon-"][disabled], [class*=" icon-"][disabled], [class^="icon-"].disabled, [class*=" icon-"].disabled { cursor: default; opacity: 0.25; }
Isolated example where "disabled" icons look the same as "enabled" icons:
<div class="container">
<span class="icon-play"></span>
<span class="icon-pause" disabled="disabled"></span>
<span class="icon-stop" disabled="disabled"></span>
</div>
An example of before and after:

I think from 3.0 if the font icons is implement it could be an easy fix, but it would be a mess with the image files..
I totally agree that with font icons these kind of things would be much easier to do. I was not aware that this is a feature in the new version and if that is the case, it would be useless to find a solution for the halflings.
However, an other proper solution for the halflings is to provide a third set, next to the black and white, that represents the disabled state, like gray.
Is there any reference to the new featureset so I can embed it in here and close this right away?
The font icons is mentioned in this wiki https://github.com/twitter/bootstrap/wiki/Upcoming-3.0-changes
I've checked those notes twice and the second time I indeed noticed that a move will be made to the fonts by Glyphicons. However, these are only included in the PRO package, so I'm not sure how this will go, as Bootstrap is offered without any fees.
On top of all this, a direct quote:
While our last major version bump (2.0) was a complete rewrite of the docs, CSS, and JavaScript, the move to 3.0 is not quite as ambitious. This is an ongoing document to identify the changes we'll be making along the way.
My conclusion is that this update will not be comming any time soon and therefore I suppose my request is still valid. I in fact do not care how the solution is made, let it be images, fonts or whatever, just that it's there. I cannot imagine that nobody else needed such a thing, especially for the action kind of icons...
We're using font icons in 3.0—going to close this out. Not a feature we're going to provide in the core for now. Thanks though!
Even though this is a closed issue, here is the CSS to make disabling the icons work in diabled menu items:
/* Workaround for issue where icons in disabled menu items don't turn "grey" to
* indicate disabled state
* https://github.com/twbs/bootstrap/issues/6187 */
.dropdown-menu > li.disabled > a > [class^="icon-"],
.dropdown-menu > li.disabled > a:hover > [class^="icon-"],
.dropdown-menu > li.disabled > a:focus > [class^="icon-"],
.dropdown-menu > li.disabled > a > [class*=" icon-"],
.dropdown-menu > li.disabled > a:hover > [class*=" icon-"],
.dropdown-menu > li.disabled > a:focus > [class*=" icon-"]
{
cursor: default;
opacity: 0.25;
background-image: url("../img/glyphicons-halflings.png")
}
I don't expect any action from anybody, but here is the stuff. Can be modified to suit your particular use-case, I guess.
Something that became possible recently is this: http://caniuse.com/#feat=css-filters
img.disabled
{
opacity: 0.8;
filter: grayscale( 100% );
-webkit-filter: grayscale( 1 );
}
Not sure if it works on the font icons as well but it's a nice thing imo Wanted to leave this here after a search brought me here and got me in the right direction...