Is there a list of WordPress CSS id/classes that I can use to build plugin option screens that look and feel more like a normal WordPress option page? I have found some through serendipity but it would have been nice to have a list.
An example is this class: button-primary That makes a button look like this:
We’re working on updating http://dotorgstyleguide.wordpress.com/ to have more of this information and reflect the style updates from 3.2.
Other than that, I’ve seen a plugin (that I currently cannot locate) that shows a demo page of sorts that displays the various CSS selectors and what they look like, but I believe it was outdated. Other than that, your best option for now may be to just fire up Firebug/Web Inspector and take a look at wp-admin/css/wp-admin.dev.css.
Install this plugin and you see all elements, class and ids
https://github.com/bueltge/WordPress-Admin-Style
*Note: For Frontend side – Here is the list which i have extracted after a lot of R&D in wordpress default css styles. I did my best to research everything and organize everything as accurately as possible. If you see anything missing or incomplete, please write in the comments. I hope it might help you to develop your desired plugins and themes *
The WordPress backend does have generated “body” classes. I have never seen these explicitly documented anywhere (though I could well have missed it). You can see them and how they are generated in the
admin-header.php
source.The generated classes are very similar to the front-end ones:
I got to this question because I was creating a custom admin page using add_menu_page(). You’re going to want to put your content between
This will activate the standard WordPress admin backend CSS so that your custom admin page looks normal. Other divs would be automatically handled by WordPress in this case.
Here is an other interesting article that makes a decent job of listing all the available css classes/html markup one can use in styling an admin page. The articles is a little outdated in that it show styling results from older version of WordPress, so its likely that additional classes have been added since.
Another useful resources are the WordPress dashicons.
However, I have to congratulate @bueltge on his excellent plugin listed below which does a great job of keeping an updated reference of admin styles.