[wp-trac] [WordPress Trac] #14430: editor-style.css of a child theme overriden by parent theme

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 17 05:57:30 UTC 2011


#14430: editor-style.css of a child theme overriden by parent theme
-------------------------------------+-------------------------
 Reporter:  helix84                  |       Owner:  JohnPBloch
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:  3.1
Component:  General                  |     Version:  3.0
 Severity:  normal                   |  Resolution:  fixed
 Keywords:  has-patch needs-refresh  |
-------------------------------------+-------------------------
Changes (by dd32):

 * status:  reopened => closed
 * resolution:   => fixed
 * version:  3.2.1 => 3.0
 * component:  Formatting => General


Comment:

 The problem you've got is slightly different.

 The Files are being enqueued in order of definition. The child theme is
 registering 'child-editor-style.css' before the parent theme registers
 'editor-style.css'. Since these have different names, they're just being
 enqueued in the order they were registered.

 The patch here dealt with the child theme's file being added before the
 parents theme file '''when they were the same name'''. It's probably
 better in a new ticket to change it so all parent css is included before
 all child css.

 Since this ticket was closed in the 3.1 milestone, I'm reclosing this, but
 I've opened #18457 to suggest adding ''all'' styles from the parent theme,
 and then ''all'' styles from the child theme.

 Tip: Name your child-editor-style.css file 'editor-style.css', remove the
 add_editor_style() call from your child theme, and rely on the fact that
 the parents call with include both the parent, and child, editor-style.css
 files in the correct order.

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


More information about the wp-trac mailing list