Opened 11 years ago
Closed 11 years ago
#5204 closed enhancement (fixed)
Add class 'page' to bp_get_the _body_class() if theme compat active
Reported by: | hnla | Owned by: | djpaul |
---|---|---|---|
Milestone: | 2.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Core | Keywords: | has-patch early |
Cc: | karmatosed, mercime |
Description
Patch adds a class of 'page' to the body tag if theme compat returns true.
Reason?:
Ran across a forum post theme issue with BP rendering it's screens in a tiny narrow 300px wide element, styled on article.post, theme then set a desired size for it's layout based on '.page article.post' or '.single-post article.post' whereas this is a backwards bit of coding it did suggest the possibility of this as a re-occuring issue with themes; it's not the first time I have run across layouts relying on specific styling based on a parent class of .page or .single-post. In the case of BP we essentially say that a theme compat template is in essence a WP page yet we do not pass through any class to suggest that to third party themes ' buddypress' is useful but only if you know it exists.
I propose the patch as a means of perhaps preventing a few themes from failing to present BP screens simply due to their styling based on presumed classes. I think, but am not 100% certain, that this should have no unintended consequences?
Attachments (1)
Change History (8)
#1
@
11 years ago
- Keywords dev-feedback added
This might have the effect of the theme overriding some of BP's loosely-named element styles. I'm just speculating at this point though.
I'm okay with it if another dev (core or theme) is okay with it.
#2
@
11 years ago
This might have the effect of the theme overriding some of BP's loosely-named element styles. I'm just speculating at this point though.
Yes point taken, however thinking it over I think even if this was the case, that that's really the themes issue, BP deliberately attempts to exert as little forced styling as possible, but in the event of the scenario I describe above, a theme had wrecked the BP screens completely and for a novice they would have puzzled at how to correct; again given that in a sense that class ought to be there as this is a page it may be will help prevent a few horrendous theme issues that might be encountered.
#3
@
11 years ago
- Cc karmatosed mercime added
- Milestone changed from Awaiting Review to Future Release
CC'ing karmatosed and mercime for their opinions, and bumping to future release for now.
#4
@
11 years ago
it's not the first time I have run across layouts relying on specific styling based on a parent class of .page or .single-post.
+1 on adding page body class to BP pages, a practical solution for improved theme integration.
Add 'page' class to body tag for theme compat templates