Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

Last modified 8 years ago

#3239 closed defect (bug) (fixed)

Sticky posts styling not working on all indexes

Reported by: djpaul's profile DJPaul Owned by: djpaul's profile DJPaul
Milestone: 1.5 Priority: normal
Severity: Version: 1.5
Component: Templates Keywords:
Cc:

Description

Review feedback: "Sticky posts must be styled and functioning correctly; this should be the case whether front page is set to blog posts by default or when a front page is set to Static Page and blog posts are in regular page.

For bp-default theme, sticky posts styling (orange background for meta) only shows up when set up is default blog posts for front page but fails when front page is set to static page."

Attachments (2)

divsticky.diff (451 bytes) - added by karmatosed 13 years ago.
nodivsticky.diff (410 bytes) - added by karmatosed 13 years ago.

Download all attachments as: .zip

Change History (9)

#1 @karmatosed
13 years ago

  • Owner set to karmatosed
  • Status changed from new to accepted

#2 @karmatosed
13 years ago

I've got 2 suggestions both just changing css rather than styling as use the same styling.

  1. Keep the absolute naming and have it as - divsticky.diff attached:
body.home-page .sticky .date, 
div.page .sticky .date {
	background: #fff9db;
	border-top: 1px solid #ffe8c4;
	border-bottom: 1px solid #ffe8c4;
	color: #ffa200;
	padding: 5px;
}
  1. Just do a .sticky styling on that element - nodivsticky.diff attached: Unless objections this would be my recommendation.
.sticky .date {
	background: #fff9db;
	border-top: 1px solid #ffe8c4;
	border-bottom: 1px solid #ffe8c4;
	color: #ffa200;
	padding: 5px;
}

#3 @karmatosed
13 years ago

Passing to you Paul for confirmation of which method you want to use.

#4 @karmatosed
13 years ago

  • Owner changed from karmatosed to DJPaul
  • Status changed from accepted to assigned

#5 @hnla
13 years ago

The later is the best approach, the former is too specific and can break, theoretically, if stickies somehow appeared on another page, or those antecedent selectors changed in any manner.

Descendant selectors while powerful and important to understand and use become dangerous and hard to trouble shoot in dynamic sites where content is vast and complicated, where possible styling to classes and ID with descendant selectors used only where absolutely necessary is safest.

#6 @djpaul
13 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [4411]) Make sticky post CSS style less generic when blog posts are set to display on a regular page. Fixes #3239, props karmatosed

#7 @DJPaul
8 years ago

  • Component changed from Appearance - Template Parts to Templates
Note: See TracTickets for help on using tickets.