.even and .odd css classes are not applied correctly when submissions are hidden #609

Closed
aperson opened this Issue Dec 22, 2012 · 8 comments

Projects

None yet

5 participants

@aperson
Contributor
aperson commented Dec 22, 2012

I was experimenting with styling even numbered submissions in /r/Minecraft and found that .even and .odd are not applied correctly if a user has submissions hidden. Here's a picture with .odd {background-color: red} applied to my /r/Minecraft:

http://i.imgur.com/uMLf4.png

As a note, I do have RES installed in that screenshot, but I tested with and without to be sure that the problem is on reddit's end.

@spladug
Member
spladug commented Dec 24, 2012

How is the link in question hidden? If it's a RES filter that's not a reddit bug.

@thor
thor commented Dec 24, 2012

I'd just like to:
a) You can use :nth-child to appropriately accomplish this for browsers
that support this, without relying on actual markup.
b) I can confirm that this is an error in the templating. I'm not running
RES, and I'm also able to reproduce said fault.

I'm not awfully awesome in python, but maybe I'll see if I manage to find
where the magic happens.
On Mon, Dec 24, 2012 at 8:15 AM, Neil Williams notifications@github.comwrote:

How is the link in question hidden? If it's a RES filter that's not a
reddit bug.


Reply to this email directly or view it on GitHubhttps://github.com/reddit/reddit/issues/609#issuecomment-11655505.

@spladug
Member
spladug commented Dec 24, 2012

@andre-d says he knows the fix.

@andre-d
Contributor
andre-d commented May 17, 2013

To clarify, the issue is that the odd/even class happens at wrap time, and keep/skip happens after wrapping. The solution is to move the odd/even logic out of builder and further down the line. Or maybe some kind of post wrapping function...

@andre-d
Contributor
andre-d commented May 17, 2013

IDEALY, that would be kept in the template, but it is old logic and we have multiple listing templates which would have to duplicate that functionality.

@bsimpson63
Member
@andre-d
Contributor
andre-d commented May 20, 2013

Yeah, @bsimpson63 that did the trick.

@aperson
Contributor
aperson commented May 27, 2013

Closing now!

@aperson aperson closed this May 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment