Index: /CKEditor/trunk/_source/plugins/button/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/button/plugin.js	(revision 3057)
+++ /CKEditor/trunk/_source/plugins/button/plugin.js	(revision 3058)
@@ -117,4 +117,8 @@
 		};
 
+		var index = CKEDITOR.ui.button._.instances.push( instance ) - 1;
+		
+		var classes = 'cke_button';
+		
 		// Get the command name.
 		var command = this.command;
@@ -131,12 +135,18 @@
 						this.setState( command.state );
 					}, this);
+
+				classes += ' cke_' + (
+					command.state == CKEDITOR.TRISTATE_ON ? 'on' :
+					command.state == CKEDITOR.TRISTATE_DISABLED ? 'disabled' :
+					'off' );
 			}
 		}
 
-		var index = CKEDITOR.ui.button._.instances.push( instance ) - 1;
+		if ( this.className )
+			classes += ' ' + this.className;
 
 		output.push(
 			'<a id="', id, '"' +
-				' class="cke_button ', this.className, '" href="javascript:void(\'', ( this.label || '' ).replace( "'", '' ), '\')"' +
+				' class="', classes, '" href="javascript:void(\'', ( this.label || '' ).replace( "'", '' ), '\')"' +
 				' title="', this.title, '"' +
 				' tabindex="-1"' +
