[wp-hackers] CSS backwards compatibility in Admin

Stephen Rider wp-hackers at striderweb.com
Wed Nov 5 16:14:23 GMT 2008


Hi all --

I've noted that in the Admin for 2.7, the submit buttons on Admin  
pages now have a class="button-primary" assigned.

The visual difference is that with this class, the button is a medium  
blue color, and without it (presumably for "secondary" buttons) the  
color is a faded gray.

For the sake of both a) cleaner code, and b) backwards compatibility  
with plugins, shouldn't this be reversed?

That is, buttons should be blue by default, and IF there is a  
class="button-secondary" then it is the faded gray?  Surely the  
secondary buttons are the special case here, as most forms have a  
single, primary, button.

Not a major thing, but again one more silly little thing for plugin  
authors to have to go back in and change to make their plugins match  
the current look of admin.  When making these changes, it's good to  
keep in mind what happens to existing code.

Stephen


More information about the wp-hackers mailing list