[wp-trac] [WordPress Trac] #13375: Make admin styles more re-usable

WordPress Trac wp-trac at lists.automattic.com
Thu May 13 14:09:36 UTC 2010


#13375: Make admin styles more re-usable
---------------------------+------------------------------------------------
 Reporter:  aaroncampbell  |       Owner:             
     Type:  defect (bug)   |      Status:  new        
 Priority:  normal         |   Milestone:  3.1        
Component:  UI             |     Version:  3.0        
 Severity:  normal         |    Keywords:  needs-patch
---------------------------+------------------------------------------------
 I had a project recently where I wanted to create a meta box that worked
 very much like the Custom Fields box.  I also wanted to style it
 similarly.  Unfortunately, to style it like the custom fields box you need
 your content wrapped in a div with the id `postcustomstuff` and have that
 wrapped in a div with the id `postcustom`.  Luckily for me, I was creating
 this to be used with the Shopp plugin, so those IDs are not already in
 use.

 However, if you wanted to do the same thing and it needed to work in
 conjunction with the custom fields box, there'd be no way to re-use those
 styles.  Actually, there'd be no good way to style it properly at all.
 When I looked into it, I'd have to copy styles from the admin css, the rtl
 css, and even from colors-clasic and colors-fresh.  Even then, I could
 only style it for those two admin themes and not any admin theme.

 It seems that there are a LOT of these cases in the admin styles.  If it's
 something a user might want to duplicate (any meta boxes for example), it
 should use classes so it can be duplicated.  Maybe even name the classes
 more generically so they don't have to do with "postcustom".

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13375>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list