[buddypress-trac] [BuddyPress] #3389: Enqueueing CSS of bp-default breaks child theme layouts

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Wed Jul 27 01:12:50 UTC 2011


#3389: Enqueueing CSS of bp-default breaks child theme layouts
---------------------+------------------------------
 Reporter:  mercime  |       Owner:
     Type:  defect   |      Status:  new
 Priority:  normal   |   Milestone:  Awaiting Review
Component:  Theme    |     Version:  1.3
 Severity:  normal   |  Resolution:
 Keywords:           |
---------------------+------------------------------

Comment (by mercime):

 @djpaul @ray it would be better if I give a better example of what
 enqueueing CSS in bp-default theme would do to other installs using the
 Unplugged BP child theme with CSS-ONLY revisions
 http://wordpress.org/extend/themes/unplugged

 You see the all-dark Unplugged theme upon activation turns white in
 content area per image above. Adding the just the deregister default.css
 function without enqueueing own style in a new functions.php I uploaded to
 Unplugged theme folder is not working as seen in second unplugged image
 and in image from theme I am working on for submission to WP Theme Repo.

 As for your code @ray where in addition to deregistering default.css
 enqueueing my own style as well, it's working great.  But I doubt everyone
 else upgrading their installs to BP 1.3 would think or know outright that
 they would need to deregister default.css and to enqueue own styles in the
 first place.

 It looks like if one doesn't use the exact selector used in default.css of
 bp-default theme, the CSS of child theme gets overwritten especially in BP
 component areas.

 Two ways I could completely prevent default.css from enqueueing were as
 you can see, not quite ideal but has allowed me to continue working on the
 BP child theme:
 - comment out the function in bp-default functions.php
 - or add the following to child theme's functions.php
 {{{
 function bp_dtheme_enqueue_styles() {
         // leave it blank
         }
         add_action( 'wp_print_styles', 'bp_dtheme_enqueue_styles' );
 }}}

 @djpaul, the theme is not fit for distribution yet. Working on issues
 brought up by Debogger plugin per attached image BPSNetwork-debogger.gif
 attached.

 I haven't checked what happens to installs using WP themes with BP
 Template Pack, but I will venture to say that there will be a great influx
 of users into BP.org forums who upgrade to BP 1.3 and see layouts broken
 in BP Child Themes alone. Which brings me back to suggestions above or
 find better alternative please.

 For your consideration.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3389#comment:3>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list