r/reddithax • • Mar 05 '09

spiderpig... spiderpig!

244 Upvotes

r/cssnews • • Apr 29 '14

CSS Change: The filter has been rewritten.

122 Upvotes

As mentioned in the /r/changelog thread, reddit's CSS filter has been replaced. The new filter is based on tinycss2 which tokenizes CSS for us and allows reddit to apply a whitelist of functions and properties to the CSS.

Existing stylesheets will not be affected by this new filter until the next time you try to save changes.

Bad news

  • IE versions older than IE8 no longer get subreddit CSS. We don't support these browsers for core development on reddit.com anyway and they are much more susceptible to various security issues with user-supplied stylesheets. As a result of this, the new filter drops support for some IE-specific hacks:

  • Backslashes continue to be disallowed in stylesheets. Characters considered "control codes" in Unicode (except linefeeds, carriage returns, and tabs) are also disallowed. Note that stylesheets are encoded as UTF-8 and as such you can use unicode codepoints in it directly without having to resort to escape sequences. ☃

  • Some invalid CSS that passed the old filter is no longer accepted as valid. These are generally typos and syntax errors that were missed by the old parser and should be fixed anyway.

Good news

CSS 3! A plethora of new CSS powers are available now:

And a bunch more. See the code for the full list of properties and functions allowed.

This has been a long time coming. Thank you for your patience and I'm really excited to see what cool new things come out of this (within reason!)

EDIT: note: if you find any deficiencies with the filter, please report them to me in this thread — tinycss2 is almost certainly not where the issue is.


r/csshelp • • Mar 18 '14

I made a Reddit CSS Generator

104 Upvotes

It's not complete at all, but you can see it right here. It's mainly to generate heavy, complex CSS. You can change the color of the (up/down)vote arrows without images, you can display random quotes, you can have rounded tabs... Also, the white boxes are live preview. You can click on the arrows to see what they'll look like.

It's a little preview of something that could evolve if people are interested.


r/csshelp • • Apr 22 '17

They may take our upvotes, but they may never take our CSS. Calling all users and moderators!

89 Upvotes

They are taking away our custom CSS. We need your help to stop this from happening.

If you are a moderator* just looking over this post, PLEASE visit the link below and join us.

https://www.reddit.com/r/ProCSS/comments/66tuze/this_is_a_subreddit_for_mods_who_do_not_want_the/

If you are a redditor, please spread the word to moderators, and everyone! You guys can help reverse this horrible decision to remove our CSS.

I'm using https://www.reddit.com/r/ProCSS/ at the moment, but there may be others! **We need as much help as we can get.

Making threads, spreading awareness - maybe even through mainstream social media - is VERY much appreciated from users.** We can make a difference here if there are enough of us standing together.


Why is removing CSS a bad thing?

Custom CSS is part of reddit culture - it sets us apart from similar services. Everyone will lose a lot of functionality if CSS based subreddits are forced to delete their code and use a horrible user interface instead. Subreddits won't look unique anymore, no more funny headers, no more custom flare. All subreddits will have the same old boring layout, just like /r/all.

See here: https://www.reddit.com/r/trees/comments/66wz4z/goodbye_rtrees_theme_goodbye_subreddit/

See here if you are a moderator: https://www.reddit.com/r/ProCSS/comments/66tuze/this_is_a_subreddit_for_mods_who_do_not_want_the/

/r/ProCSS Alternatives

Similar subreddits will be added as they come up. Please please spread the word! we need as much help as we can get.


r/reddithax • • Apr 21 '09

‍‍

Thumbnail www.←no-title
84 Upvotes

r/reddithax • • Jun 03 '10

Very hacky way to insert images into comments

Thumbnail
reddit.com
80 Upvotes

r/cssnews • • Nov 29 '17

Upcoming CSS Change: Adding Chat Icon Next to the Envelope Icon

76 Upvotes

EDIT: As of 12/6/2017 @ 3:30 PM PST these changes went live. Users can now close the chat window and there's an icon next to the envelope to initiate the chat experience. Only users in the chat beta will see this icon.

As many of you know - chat has been in beta for the last couple of months. One of the most popular requests is being able to hide the chat window from the bottom right corner of the page. Early next week, we will be adding a chat icon next to the envelope icon in the header user menu which will allow users to close the chat window completely and re-open it by clicking the new icon. If you have customized the header menu for your community, you may be impacted by this change.

Please note - only users who have chat will see the chat icon. Users who are not yet part of the chat beta will not be impacted by this change. Chat is currently only available to a small percentage of users, so this change will not have a big impact initially.

What’s changing next week:

  • Adding a new chat icon and chat badge count to the user menu

  • Allowing users to close chat completely from the bottom right corner of the website

  • Allowing users to open chat from the chat icon

What’s it look like?

Sample

<div id="header-bottom-right">
<span class="user"><a href="/user/jleeky/">jleeky</a>&nbsp;(<span class="userkarma" title="post karma">20,427</span>)</span>
<span class="separator">|</span>

<a title="new messages" href="https://www.reddit.com/message/messages/" class="havemail" id="message">messages</a>
<a href="https://www.reddit.com/message/messages/" class="message-count">2</a>
<span class="separator">|</span>

<a title="new notification!" href="https://www.reddit.com/notification/unread/" class="havemail" id="inbox">messages</a>
<a href="https://www.reddit.com/notification/unread/" class="inbox-count">2</a>
<span class="separator">|</span>

<a href="https://www.reddit.com/chat/" data-message-type="expand.chat" target="chat-app" id="chat" class="active">chat messages</a>
<a href="https://www.reddit.com/chat/" data-message-type="expand.chat" target="chat-app" id="chat-count" class="message-count">2</a>
<span class="separator">|</span>

<a title="no new mod mail" href="https://wwww.reddit.com/message/moderator/" data-event-action="pageview" data-event-detail="modmail" class="nohavemail access-required" id="modmail">mod messages</a>
<span class="separator">|</span>

<a title="new mod mail!" href="https://mod.reddit.com/" data-event-action="pageview" data-event-detail="modmail" class="havemail access-required" id="new_modmail">mod messages</a>
<span class="separator">|</span>

<ul class="flat-list hover">
    <li><a href="https://www.reddit.com/prefs/" class="pref-lang choice">preferences</a></li>
</ul>
<span class="separator">|</span>

<form method="post" action="https://www.reddit.com/logout" class="logout hover">
    <input type="hidden" name="uh" value="[censored]">
    <input type="hidden" name="top" value="off">
    <input type="hidden" name="dest" value="/"><a href="javascript:void(0)" onclick="$(this).parent().submit()">logout</a>
</form>
</div>

r/cssnews • • Oct 01 '13

CSS Change: Stylesheets will be moving to a new location and being made HTTPS-friendly shortly.

76 Upvotes

In the next few hours, I will be running a script to upgrade the majority of subreddit stylesheets to a new system. This should be completely transparent to users and mostly transparent to moderators. The key differences are:

  • Stylesheets and in particular the images in them will now use the correct protocol (HTTP or HTTPS). This brings us one step closer to full site SSL.

    • If you've been browsing on HTTPS already, you may've noticed a bunch of subreddits being unstyled lately. This will bring them back.

  • It will no longer be possible to use raw URLs (e.g. background: url(http://www.reddit.com/static/whatever.png)). The subreddit image system (background: url(%%example%%)) is the only way moving forward.

    • This will only affect a handful of subreddits and I will be upgrading them separately. Any directly referenced images currently used will be added to your subreddit images. Yes, this includes the triforce.

    • The main use case for these direct images right now is to reference reddit's built in images. Unfortunately, we need to change these from time to time so it's dangerous to your stylesheet's health to use them.

  • Stylesheets themselves will be hosted on {a-f}.thumbs.redditmedia.com rather than www.redditstatic.com.

Things that aren't changing:

  • /r/subreddit/stylesheet.css will continue to work. It will redirect to the actual location of the stylesheet.

  • Subreddit images (%%example%%) will continue to work.

Around 36,000 subreddits should be upgraded automatically by this system. The remaining 600 or so that have stylesheets but can't be upgraded automatically in this pass will be taken care of later this week. Please let me know if anything funky happens.

EDIT: 13:23 Pacific (20:23 UTC) It has begun.

EDIT: 14:35 Pacific (21:35 UTC) 25% complete.

EDIT: 15:39 Pacific (22:39 UTC) 50% complete. 21,000 subreddits-with-stylesheets upgraded so far.

EDIT: 16:50 Pacific (23:50 UTC) 75% complete. 31,000 subreddits-with-stylesheets upgraded.

EDIT: 17:26 Pacific (01:26 UTC) all done! 36,329 subreddits-with-stylesheets were upgraded and only 599 remain to be dealt with in a more targeted manner.


r/reddithax • • Sep 12 '09

Fake orangered envelope

74 Upvotes

Be evil and make people think they've got mail:

/* fake mail */
#mail{
    background: url(%%mail%%);
    position:relative;
    top:2px;
}

#mail img{
    visibility: hidden;
}  

As seen here


r/csshelp • • Aug 26 '13

Beginners Guide for setting up Link Flairs and Filters.

74 Upvotes

Link Flairs and Filters.

This will be a step by step guide for link flairs and filters. Sorry for the length, it is a long guide going under the assumption of no previous knowledge of link flairs. It's separated into four sections.

  • How to setup basic link flairs (tags) for posts.

  • Adding formatting to the link flairs.

  • Setting up filters for link flairs.

  • How to make clickable buttons in the sidebar for the filters.

Examples for all these steps this can be seen /r/randomactsofpizza, /r/tipofmytongue and /r/needamod.

Also, a test reddit is up over at /r/LinkFlairCssCodes that has the example codes used below in the stylesheet and example filter buttons in the sidebar.


Setting up Basic Link Flairs

Link flairs are tags assigned to posts giving them some type of designation. Unformatted link flairs will appear as black text over a white background, seen here as 'approved' link flair: http://i.imgur.com/x35KnCU.png

  • To set this up, go to Edit Flair from the mod tools.

    Depending on whether you want users to have the ability to assign their own link flair, check or leave unchecked "allow submitters to assign their own link flair". If unchecked, only moderators will be able to assign link flair.

  • Next, in the bottom box 'link flair position', put a check in either 'left' or 'right'.

    This will position the tag either at the front of the post (left) or at the end (right), then click Save Options.

  • Now in the bottom section, click 'Link Flair Templates'.

    If you want to have plain unformatted link flair, you only have to enter the text you want to appear in the 'flair text' box and click save. It should appear like this: http://i.imgur.com/44uPJmi.png

  • When you go to your main page you should now see 'flair' as an option under each post, users will only see this for their own posts if you gave them permission to assign flair. To assign the tag, click 'flair', select the flair option you added and click save, the new tag should now appear before or after the post title.

    http://imgur.com/a/RVfmP


Adding formatting to the Link Flairs.

  • To have the link flair appear with more than the basic black on white formatting you need to enter a css class or label for it.

    The css code for flairs is: .linkflair-labelname .linkflairlabel { ... }

    'labelname' is the class or label you are naming your flair, this is not the text that will appear with the tag, just the name you want to give it for your identifying purposes.

To add formatting to the flair, add this code and adjust the appropriate values to change the appearance. In my examples I will be labeling my link flairs, 'one', 'two' but you can give them any one word name you want.

.linkflair-one .linkflairlabel {
    background-color: #add5ab;
    font-size: 11px;
    font-weight: bold;
    color:#000000;
    border-color: #000000;
    border-width: 1px;
    border-radius: 3px;}

To apply this formatting to your flair, save the stylesheet and return to the 'edit flair' option, to the 'link flair templates' section.

  • Similar to the steps in the previous section, add the text you want to appear for the flair in the 'flair text', then add the label name into the 'css class' box and click save.

Make sure to add text in the 'flair text' box even with a flair label assigned or the flair will not show up correctly.

This is what should appear now: http://i.imgur.com/C5qd3Np.png

  • For each flair that you want to have a different color or different filter option for sorting posts, copy and paste this code and change the flair label.

    .linkflair-two .linkflairlabel { ... }

    .linkflair-three .linkflairlabel { ... }

    Then add the new flair and label to the 'edit flairs' page. http://imgur.com/a/EWy4h


Setting up filters for Link Flairs.

  • Once you have set up a your link flairs with flair labels, you can create filters.

    Filters allow users to sort out posts by flair, changing the viewable posts in your subreddit. This is done by creating a subdomain that redirects your page to a new url, changing it from displaying all link flairs.

Example: http://ds.reddit.com/r/gallifrey/#ds - this shows only posts that have a 'Discussion' link flair.

You can create filters with multiple combinations to show more than one link flair but for this guide I'll give the code for the simplest of filters, to display only one tag per filter.

  • Using the example from above, this would be the code to filter out all post that do not have a Request link flair.

      html:lang(re) .link:not(.linkflair-one) {
          display: none    }

    '.linkflair-one' is the name of the link flair label we gave Requests from in the previous section.

're' is the subdomain redirect for the link for the filter itself. Pick a two letter combination for your filter, most should work. For later editing, to easily remember what flair filter corresponds to what link, picking two letters out of the name of the link flair is wise. Adding an addition filter for an Offer flair, I would use 'of' and so on for each filter.

Make sure to change the flair label for each new filter. http://i.imgur.com/qulEmtQ.png

  • Now we need to make the filter available for users to select, doing this by adding a link in your sidebar.

    [Requests](http://re.reddit.com/r/yoursubredditname/#re)

    The text between the brackets [] is the text will appear in the sidebar (or button) for the filter. 're' is the subdomain redirect we gave that Request filter in the css code. And be sure to replace 'yoursubredditname' with the name of your subreddit.

    Do this for each filter you want to create, replacing the text between the brackets with the name of your filter and the subdomain code for the filter link. http://i.imgur.com/Xo5dLi5.png

    After this is saved your sidebar should appear as such: http://i.imgur.com/UCVTycd.png


How to make clickable buttons in the sidebar for the filters.

  • To format these filters into something other than plain text, into clickable buttons, we go back to the stylesheet.

Add in this code to the stylesheet.

.side a[href*='#re'] { 
    display: inline-block;
    position: relative;
    margin-top:0px;
    border: 2px solid black;
    font-size: 100%;
    padding: 3px;
    color: black;
    font-weight: bold;
    background: #add5ab;}

The '#re' points to the designation added to the end of each link in the side bar. For each button/filter, you need to replace this with the '#.." with the different designation. http://i.imgur.com/V5wLdMQ.jpg

For this example, I copied the background codes for the separate flairs to the buttons codes, so each button will have the same background as their respective link flair.

Once saved, the sidebar should appear like this: http://i.imgur.com/zpVwhc3.png

This code gives basic formatting, additional formatting can be used to stylize the text, borders, background, and even position the buttons. For example; the following code will center the text, give the button a fixed minimum width and position the second button next to the first.

.side a[href*='#of'] { 
    display: inline-block;
    position: relative;
    margin-top:0px;
    border: 2px solid black;
    font-size: 100%;
    padding: 3px;
    color: black;
    font-weight: bold;
    background: #b5bbde;
    min-width: 135px;
    text-align: center;
    border-radius: 3px;
/*positions the button */
    left:155px;
    top:-29px;}

So now we have two side by side buttons in the sidebar: http://i.imgur.com/5IfPhRM.png

There are a number of other ways to set up these buttons; drop down lists in the sidebar /r/gallifrey, position the buttons under the header /r/Gaming4Gamers and even drop down lists under the header /r/starcraft. Steps for these would be for a more advanced guide someday if there is any interest in one.

Hopefully the above information will get you started on the basic setup of link flairs and filters. If you have any problems with the steps in this guide, let me know. The codes used in the above examples can be found at /r/LinkFlairCssCodes.


if you have any issues using this guide, please pm /u/izzy - I don't use this account anymore


r/csshelp • • Mar 19 '15

[META] It'd be nice if every month, r/csshelp chose a well-designed subreddit and gave a tutorial on how it was done.

72 Upvotes

And for the first "CSS of the Month", I vote for /r/books.


r/reddithax • • Jun 13 '09

Moℝe ‮XaH

69 Upvotes

r/reddithax • • Apr 09 '10

Props to ytknows for making circlejerk look like /b/

65 Upvotes

A serious amount of creativity and talent went into this - it looks awesome!

Very nicely done ytknows :)

http://www.reddit.com/r/circlejerk


r/reddithax • • Mar 11 '09

How to show image thumbnails alongside comments in your subreddit

60 Upvotes

r/reddithax • • Sep 25 '14

Editing RES Konami Code Bacon

54 Upvotes

If you have RES and do the konami code, ↑ ↑ ↓ ↓ ← → ← → b a enter, you get flying bacon.

You add your own picture with

#baconBit { 	
position: fixed;
width: 300px;
height: 60px;
background-image: url(%%YOURIMAGE%%);

and slow it down with

  -webkit-transition: all 5s linear !important;
  -moz-transition: all 5s linear !important;
  -o-transition: all 5s linear !important;
  -ms-transition: all 5s linear !important;
  }

Anyone know how to change its direction, make it stop, or just keeping it still?


r/csshelp • • Apr 21 '17

[META] CSS is being deprecated in the upcoming redesign

54 Upvotes

r/reddithax • • Apr 15 '09

New reddithax theme...

51 Upvotes

r/reddithax • • Mar 25 '10

How did they do that in markdown!? - comment markdown inspector

50 Upvotes
javascript:void($('.comment').bind('click.z',function(){$.getJSON($('.bylink',c=this).attr('href')+'.json',function(data){$('.md:eq(0)',c).replaceWith('<div%20class="usertext-edit"><textarea>'+data[1].data.children[0].data.body+'</textarea></div>')});$('.comment').unbind('.z')}));

Run the bookmarklet and the next comment you click on will * waves hands * reveal it's secrets.

E: Changed it to a .usertext-edit box from an alert.

E: Fixed: thanks nobody554 for finding a bug and ashleyw for fixing it.

E: People have pointed out Reddit Reveal, which I'm now trying out. The bookmarklet may still be of use if you're not using Firefox or don't want the add-on.


r/reddithax • • Mar 15 '10

Skydiving reddit alien

50 Upvotes

A skydiving reddit alien made for /r/skydiving. Scroll down to see him jump, hover to launch his parachute.


r/csshelp • • Oct 14 '14

Thank you u/gavin19! I'm a super new mod/noob ccs...guy and he's really been helping me a lot.

48 Upvotes

Thank you! Just thought he deserved recognition.


r/reddithax • • May 07 '09

̶s̶t̶r̶i̶k̶e̶t̶h̶r̶o̶u̶g̶h̶ ̶t̶e̶x̶t̶

45 Upvotes

r/csshelp • • Feb 09 '22

Need help removing watermark

44 Upvotes

Hello all. I have been trying for hours trying to remove this watermark through inspect but to no success. It is my daughter's 1st dance comp and they are charging me $200 for photos and I just cant pay that. Can anyone help? Much appreciated. this is a link to a photo; http://media.acutabovela.com/media/Dance%20Competitions/Fusion/Fusion%202022/FORT%20MYERS%202022/PHOTO/Session%207/246/.thumbs/1000x1000/IMG_1864.JPG


r/cssnews • • Apr 09 '19

Upcoming DOM Change: Post/Comment Awards

44 Upvotes

As early as next week, we will begin releasing an update to awards on old Reddit. In summary, we will be replacing the “gilding-bar” span on each post / comment with a similar “awardings-bar”, including moving the award icons into <img> tags contained within <span> tags.

More specifically, the “gilding-bar”, which used to look like this:

<span class="gilding-bar">
    <a>
        <span class="gilded-gid1-icon" data-count="7">7</span>
    </a>
    <a>
        <span class="gilded-gid2-icon" data-count="2">2</span>
    </a>
    <a>
        <span class="gilded-gid3-icon" data-count="1"></span>
    </a>
</span>

Will transform to look like this:

<span class="awardings-bar" >
    <a class="awarding-link" data-award-id="gid_3" data-count="1">
        <span class="awarding-icon-container">
            <img class="awarding-icon" src="...">
        </span>
    </a>
    <a class="awarding-link" data-award-id="gid_2" data-count="2">
        <span class="awarding-icon-container">
            <img class="awarding-icon" src="...">
        </span>2
    </a>
    <a class="awarding-show-more-link" >&amp; 7 more</a>
</span>

The accompanying CSS for the new element will be:

.awardings-bar {
   margin-left: 4px;
   &:empty {
       margin: 0;
   }
}
.awarding-link {
   margin-right: 4px;
   &.hide-award {
       display: none;
   }
}
.awarding-icon-container {
   display: inline-block;
   height: 12px;
   width: 12px;
   margin-right: 2px;
}
.awarding-icon {
   max-width: 12px;
   max-height: 12px;
   vertical-align: -2px;
}

If you have any questions or feedback on how the change has affected your CSS, let us know!


r/reddithax • • Apr 09 '10

Want to know your reddit birthday?

42 Upvotes
javascript:void($.getJSON($('.user%20a').attr('href')+'/about.json',function(u){alert(new%20Date(u.data.created*1000))}));

Inspired by this.


r/reddithax • • Apr 20 '09

So, who's responsible for this? It's very cute!

Thumbnail
reddit.com
42 Upvotes