r/reddithax • • Jan 04 '15

Expanding thumbnails; hiding backgrounds; keeping scores discrete; using content attribute

10 Upvotes

Expanding thumbnails; hiding backgrounds; keeping scores discrete; using content attribute

If anybody's interested, I found a way to expand thumbnails when the user hovers over the corresponding link. I apply the ":hover" pseudoclass to the link

  /* Change link entry color and expand thumbnail when user hovers:
  */

  .sitetable .link:hover { 
    background-color: #BBFFDD; 
  }
  .sitetable .link:hover .thumbnail img { 
    width: 320px; 
    height: auto; 
    position: fixed; 
    right: 32px; 
    top: 32px; 
    margin: 5px; 
    border: 8px inset #FF7777; z-index: 99;
  }

Unfortunately, the thumbnails really are thumbnails -- resolution in the expansion window is low.

❧

To combat downvote abuse, I require the user to hover to see the scores:

  /* Hide scores to discourage downvote abuse (but reveal them when user hovers): 
  */

  .dislikes .score.dislikes { 
    content: "◐";
    font-size: 200%;
    color: #770000;
  }
  .unvoted .score.unvoted { 
    content: "◒";
    font-size: 200%;
    color: #007700;
  }
  .likes .score.likes { 
    content: "◑";
    font-size: 200%;
    color: #000077;
  }

  /* But show scores if user insists:
  */

  .link:hover .score     { content: normal;}
  .tagline .score:hover  { content: normal;}

❧

To reduce clutter, I tried to find a way to make the .body background disappear when clicked or passed over. Here, I'm at a loss.

I thought of attaching the background to a .side element using the content attribute to specify the image url and using a low z-index to keep the background behind the .content block.

However, I just read that I.E. fails to support the content attribute. That makes me wonder whether it should be avoided.

As a novice, I welcome help and suggestions.


r/reddithax • • Jan 04 '15

Animating the subreddit dropdown

10 Upvotes
.drop-choices.srdrop {
  top: -999px !important;
  transition: top 0.3s ease-in-out;
  display: block;
}

.drop-choices.srdrop.inuse {
  top: 18px !important;
}

Example on my sub, /r/testcss2. Requested here.

Will only work if the height of the dropdown is less than 999px, adjust accordingly.


r/reddithax • • Jan 02 '15

I'm in a CSS contest for /r/Mortalkombat. Anyone care to criticize my work?

10 Upvotes

So /r/Mortalkombat needs a new look. See /r/Xhogarmkcss (outdated) for my take. Are there any other nifty tricks anyone likes to suggest? I don't get a lot of feedback from /r/Mortalkombat. Edit: after launching, I did get feedback from /r/MortalKombat :)


r/reddithax • • Dec 29 '14

Automated football fixtures in sidebar

4 Upvotes

I'm a moderator over at /r/FantasyPL - we have almost 10k users now. I was wondering if there's any way to automate the fixture table in the sidebar as it's quite a manual job at the moment. Is something like this possible?

I absolutely love the idea of automation in the sidebar so I thought I'd give you guys a shout as I'm a frequent lurker here!


r/reddithax • • Dec 28 '14

Singularity CSS teaser. What do you think?

Post image
22 Upvotes

r/reddithax • • Dec 27 '14

Twitch Stream sidebar updater I made. Updates your markdown with easy CSS selectors when a whitelisted streamer goes online/offline. (example /r/girlgamers)

Thumbnail github.com
7 Upvotes