Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: [Resolved] Group specific classes in activity stream posts

@hnla

Participant

Why remove the class, not a lot of point really to have it on one screen and not another.

The approach you should take is using descendent selectors to target your rulesets specifically. We have in the past gone through the bp body classes with a fairly fine tooth comb to ensure that no screens lack some form of unique class, so in CSS you will always have some class token that clearly identifies the screen you’re on.

The main activity stream is a directory, as is Members each has a further class, ‘activity’ & ‘members’, respectively.

You might therefore describe a targeted ruleset for main activity stream as:

.directory.activity li.groups.activity-item.rj-9 {}

<i>be careful in over weighting rulesets, concatenating three selectors on the li element is likely not necessary, always start as light as possible with just the new group id, adding in the others if it proves a case that your properties are getting overwritten by ones more specific.</i>

Likewise if you wanted to actually target groups activity or user account screens you will find classes for those as well; groups: ‘single-item’, ‘group-home’; User accounts: ‘bp-user’, ‘activity’, ‘my-activity’

Keep an eye on the body element class attr to see what appears from screen to screen.

Skip to toolbar