[wp-trac] [WordPress Trac] #18314: Merge admin CSS files and remove duplicates

WordPress Trac wp-trac at lists.automattic.com
Tue Aug 2 00:24:13 UTC 2011


#18314: Merge admin CSS files and remove duplicates
-------------------------+------------------
 Reporter:  azaozz       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  3.3
Component:  Performance  |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------

Comment (by azaozz):

 Replying to [comment:7 scribu]:
 > > much harder to reuse styles
 >
 > How so? There's reusing and then there's clumping together unrelated
 elements.

 CSS doesn't care whether elements are related or not. If we repeat
 {{{
 border-width: 1px;
 border-style: solid;
 }}}
 in 20-30 places, that's duplication.

 > > harder to track duplicates
 >
 > Maybe, but not if we split the files by components: general layout, list
 tables, form elements etc.

 So if a style is defined in list-tables.css and you're adding something on
 the Add New post screen that can use it, what do you do? Do you add the
 selector to list-tables.css and "break the flow" or do you define (copy)
 the style to add-new-post.css?

 > > harder to maintain proper "cascading"
 >
 > Huh? Please give an example.

 See above. If we start mixing what CSS applies on which screen, it can get
 messier.

 Generally the question is: is it easier to maintain one large css file or
 20 small files (that will always be outputted together)? IMHO one large
 file is easier.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18314#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list