Bootstrap uses .btn to give the "button" look to both buttons and anchors.
The style isn't defined to all buttons by default, to make it easier to
implement bootstrap in existing sites, or when you have buttons you want to
style differently.

When using an anchor link (<a>), you cannot use the 'disabled' propery,
thus the .disabled class.

But Bootstrap also uses the [disabled]  attribute;

// Disabled state
.btn.disabled,
.btn[disabled] {

So when you give a <button> the class .btn, you can disable is, without
using the .disabled class.

To give (for example) all buttons, the button look, you can do something
like this in your LESS code;

button {
    .btn;
}
button[disabled] {
    .btn.disabled;
}

On Sat, Apr 14, 2012 at 04:29, Nils Kilden-Pedersen <[email protected]>wrote:

> On Fri, Apr 13, 2012 at 9:18 PM, Mike Craig <[email protected]> wrote:
>
>> The LESS syntax applies the class to :disabled so if you toggled that
>> attribute with javascript, the class changes appropriately...that makes it
>> a non-semantic application of style right?
>
>
>  That's what I was expecting, but it doesn't work. It only works when I
> hard-code the class in the HTML.
>
> I'm guessing the Javascript is using class information for rendering,
> meaning that the classes have semantic meaning, and are not just for
> presentation. And if so, I think that's a bad choice for obvious reasons.
>
>

Reply via email to