r/csshelp • • Jan 26 '16

Thumbnail not registering as 'default'

/r/DBZDokkanBattle

If you go to the sub right now, there should be a stickied thread called "Global SSR Tier List Updated" which is a link to another page on the subreddit.

The thumbnail for this is (for some reason) our snoo icon.

AFAIK, the thumbnail for any URL to a page within reddit should register as thumbnail.default but when I try to inspect the element, the default class isn't applied to it at all.

Is there any particular reason this is happening?

6 Upvotes

6 comments sorted by

1

u/gavin19 Jan 26 '16

You'd need to ask one of the staff, like Deimorz, how exactly that works. From what I can recall, it'll still attempt to source a thumbnail from internal posts.

You could use something convoluted like

.thumbnail[href*="reddit.com/"]:not(.self):not(.default) {
    background: url(%%img%%);
    height: 50px;
}
.thumbnail[href*="reddit.com/"]:not(.self):not(.default) img {
    display: none;
}

1

u/antonlabz Jan 27 '16

/u/Deimorz would you care to explain? :D

The code works very nicely Gavin but I'll keep it as it is for now so Deimorz can see the problem!

1

u/Deimorz Jan 27 '16

Hmm, I think it's because it's a link to your wiki, not a "normal" thread. So it applied its normal method of looking for a thumbnail on that page, and found your snoo icon.

1

u/antonlabz Jan 27 '16 edited Jan 27 '16

I tested it on a completely different test sub and tried to link both a normal thread within reddit and a link to the wiki and they both had the default class applied to them. (/r/OnePieceTCTestSub)

I then tested using a 'normal' thread as a link on the subreddit in question and it still doesn't seem to be registering as default.

This only seems to be happening on THAT subreddit.


The test sub is set to private and the threads I tested out are on /r/DBZDokkanBattle but I removed them so as to not spam the subreddit. Not sure if reddit admins can see removed posts/private subs.

1

u/Deimorz Jan 27 '16

I'm pretty sure default is going to happen if it can't find a thumbnail to use, so the problem is probably just that something about the images in that subreddit are being considered valid thumbnails, and it's choosing to use those.

1

u/antonlabz Jan 27 '16

Ah, you're right.

I just tried linking a normal thread that didn't contain any form or images and it had the default class being applied.

Thanks for your time!