[Note: I'm not sure if there's a task issue that lists these kind of changes. I did find some issues about cleaning up CSS but not specifically about removing classes that can simply be replaced by CSS2 selectors (that did not work in IE6),

With the drop of IE6 support (#308865: Drop IE6 support in Drupal core), there is no need anymore to use a class to indicate that a button is disabled, as both CSS and JS can easily be replaced:

CSS:

/* old */
input.form-button-disabled {... }
/* new */
input[type=submit][disabled] { ... }

JS with jQuery:

// old
$('.form-button-disabled').click(...);
// new
$('input[type=submit][disabled]').click(...);

You could argue that this holds for many (many) classes that are added by Drupal, (e.g. the class "form-button" used in the example above), but the class "form-button-disabled" is added based on an attribute that is likely to be dynamically changed using javascript (after some conditions have been met) that easily can leave the class on the element.

If the class is needed for some other reason, then at least the CSS should be changed in the Seven and Bartik themes.

Comments

csakiistvan’s picture

Component: CSS » Bartik theme
Issue summary: View changes

I found only bartik theme this class.

emma.maria’s picture

Title: Remove class form-button-disabled » Clean up CSS for buttons in Bartik
Category: Feature request » Task
Status: Active » Postponed
Issue tags: +frontend, +CSS

Once #2375673: Split Bartik's CSS into SMACSS style components has been committed we need to revive this issue and clean up the newly created buttons.css file using Seven's buttons.css as a guide.

Changing to a task as the selectors used are out of date (written to support old browsers etc) and can be reworked to be a lot cleaner.

emma.maria’s picture

Status: Postponed » Closed (duplicate)

A duplicate issue fixing the same problem with a patch to review can be found here #2400863: Add the correct classes and styles for disabled buttons in Bartik. Deciding to close this issue as duplicate as no work has yet taken place.