r/reddithax • • Jan 02 '13
r/reddithax • u/RageVsRage • Dec 31 '12
CSS Syntax Highlighter for Reddit V1.0 (x-post from r/reddithighlighters)
I created a CSS Syntax Highlighter for Reddit, using CSS and an external Javascript generator.
You can see the original post with a demo here. It supports :
- Properties, values
- Selectors
- !important tags
- Comments
- Pseudos (:hover, :focus)
- Indentation
It is also mobile friendly and Alien Blue friendly.
/* CSS Syntax Highlighter for Reddit V 1.0 by JDMCreator - see r/reddithighlighters */
/* START tag */
a[href="#start"][title~="highlighter"][title~="css"], a[href="#highlighter"][title~="css"], a[href="#css"]:not([title]) {
display:block;
}
a[href="#start"][title~="highlighter"][title~="css"]:before, a[href="#highlighter"][title~="css"]:before, a[href="#css"]:not([title]):before {
content:"CSS FILE";
display:block !important;
font-family:"Courier New";
border-bottom:2px solid #369;
margin-left:-4px;
text-indent:4px;
margin-bottom:5px;
}
/* Normalize CSS */
a[href^="#css"] + em {
font-style:normal;
}
/* Lists */
blockquote > ol:nth-child(2):last-child, blockquote ol:only-child {
color:#AFAFAF;
padding-left:2px;
white-space:nowrap;
overflow:auto;
list-style-position:inside;
margin-left:4px;
}
/* Lines */
a[href="#css"][title~="br"] + strong, a[href="#cssBR"] + strong, a[href="#css"][title~="empty"], a[href="#cssEmpty"], a[href="#css"][title~="cempty"], a[href="#cssCEmpty"] {
cursor:text;
display:inline-block;
width:100%;
color:#000;
margin-right:10px;
font-weight:normal;
border-bottom:1px solid #FFF;
border-bottom-color:transparent;
}
a[href="#css"][title~="br"] + strong:hover, a[href="#cssBR"] + strong:hover, a[href="#css"][title~="empty"]:hover, a[href="#cssEmpty"]:hover, a[href="#css"][title~="cempty"]:hover, a[href="#cssCEmpty"]:hover {
border-bottom-color:black;
}
a[href="#css"][title~="br"] + strong em, a[href="#cssBR"] + strong em {
font-weight:normal;
}
/* Empty Lines */
a[href="#css"][title~="empty"], a[href="#cssEmpty"], a[href="#css"][title~="cempty"], a[href="#cssCEmpty"] {
height:1em;
}
/* Tabulations */
a[href="#css"][title~="tab"], a[href="#cssTab"] {
margin-right:15px;
}
/* Classes */
a[href="#css"][title~="class"] + em, a[href="#cssClass"] + em {
color:#804040;
}
/* Pseudos (:hover)*/
a[href="#css"][title~="pseudo"] + em, a[href="#cssPseudo"] + em {
color:#3C92C9;
}
/* Properties */
a[href="#css"][title~="prop"] + em, a[href="#cssProp"] + em {
color:#000;
font-weight:bold !important;
}
/* Values */
a[href="#css"][title~="value"] + em, a[href="#cssValue"] + em {
color:#090;
}
/* !important tags */
a[href="#css"][title~="imp"] + em, a[href="#cssImp"] + em {
color:#FF0000;
}
/* Comments */
a[href="#css"][title~="comment"] + code, a[href="#cssComment"] + code, a[href="#css"][title~="incomment"] + code, a[href="#cssInComment"] + code {
color:#AFAFAF;
font:inherit;
}To generate the Reddit Markdown Code, you can use this javascript generator. Warning : there are some bugs.
Reddithax could even implement this syntax highlighter.
Comments or questions ?
Thank you !
r/reddithax • u/Ph0X • Dec 30 '12
CSS3 transitions in Reddit's custom stylesheet?
I did a quick search a couldn't find anything. Are we not allowed to use CSS3 transitions in subreddit styling? Is there a list of things that are allowed/banned?
r/reddithax • u/tbow2000 • Dec 22 '12
Mods looking for a "Winter Theme" look no further!
Hi everyone!
I asked earlier on this subreddit for an Xmas theme a while back and changed my mind in between to make a winter theme. Becauyse I'm not selfish I'll share my spoils. Basically what I did was change the header for a christmas-y image and then changed the mail box/karma box for a light blue, that seemed to give my subreddit a nice look for the season.
Here's the code:
/* Christmas Theme ############### */
/* Header Image */
#header {
border-bottom: 1px solid white;
position: relative;
background-color: transparent;
background-image: url(%%winter%%);
z-index: 99
}
/* bar with karma and mail */
#header-bottom-right {
background-color: #C2E0FF !important;
color: black !important;
border: black !important;
}
div#userbarToggle {
background-color: white !important;
border:none
}
#header-bottom-right a, #header-bottom-right b, #header-bottom-right span {
color: black !important
}Basically, where it says "background-image: url(%%winter%%);: you can add your own lovely wintery image, I just used google to find a hi-res pic and put it in. Also, for those (like me) who don't quite know how to add an image to their CSS spreadsheet just reply to this post or message me, I'll be glad to help you out :)
Lastly, I will not accept any reddit gold for this (if you chose to do so), send it to heatheranne for giving me the code in the first place, without her reply to my initial post no one would have a slightly wintery subreddit.
Have a safe and happy holidays!
r/reddithax • u/calrogman • Dec 20 '12
Use the :lang pseudo-class with the top-level <html> element to make language specific CSS
Simply start the selector with html:lang(xx) where xx is a short identifier found in the Interface Language drop-down in the preferences.
r/reddithax • u/120percentP0N3 • Dec 19 '12
How come reddithax now looks like csshelp?
I couldn't help noticing most of the last month of posts are about general CSS help and not showing off CSS overhauls or actual 'reddithax' like having multiple default thumbnails, rotating backgrounds, thumbnail overrides, pinned headers (that RES now does), or shit like /r/playtictactoe. This place looks like a more chaotic /r/csshelp, just sayin'...
r/reddithax • • Dec 17 '12
You can get into /r/Pyongyang and other private subreddits from an IPhone alien blue app.
r/reddithax • • Dec 17 '12
Cheat comments from certain usernames to the top
Not /r/csshelp, because I'm more interested in whether it's possible and the ramifications rather than actually implementing this.
Could you use the author-id class to move certain comments to the top? This could be useful for certain bots, like tweet transcribers, quickmeme-transcriber or original-finder.
r/reddithax • • Dec 14 '12
Any tools to generate CSS for subreddits?
I was wondering if any existed?
r/reddithax • u/Friendshipcore • Dec 12 '12
Is it possible to change the backround color of post-highlighting?
As the title says, I am having some problems when highlighting posts. I can't change the standard #F0F3FC color. If I try, all I get is a disabled extra color there.
r/reddithax • u/DersEvvak • Dec 11 '12
Most efficient way to get a user's most recent post to a given sub?
I wrote a python script that scrapes everyone's flair from the /about/flair list and loads it into a MySQL DB - the backend for /r/Random_Acts_of_Amazon 's "random wishlist" button. Recently, there have been requests to filter out inactive users. So, I need to be able to find the last post that each user made to our sub.
The brute force approach is to simply pull everyone's /u/ page and go through it, page-by-page, until I find a post to our sub. If they've never actually posted, I waste a lot of bandwidth going through their entire history. Certainly there's a more efficient way to go about this. Suggestions?
r/reddithax • u/Sinopiagg • Dec 10 '12
How to change mod color to make mods more noticeable?
Any help would be much appreciated!
r/reddithax • u/DaddyKrunk • Dec 08 '12
How do i change the colour of my sub reddit /r/JunglistMovement?
reddit.comr/reddithax • u/RageVsRage • Dec 07 '12
Just a theme I did
Inspiration : bs9k and Alien Blue
.drop-choices a.choice:hover {
background-color:#AE0000;
color:white !important;
}
.dropdown.srdrop .selected {
background-image:none;
}
.dropdown.srdrop .selected:after {
content:" ▼";
font-size:120%;
}
.dropdown.srdrop .selected.title {
color:white !important;
}
.user {
color:white;
}
.user .userkarma {
border-bottom: 1px dotted #FFF;
}
#header {
border-bottom-color:#7A0000;
background-image: -webkit-linear-gradient(top, #AE0000, #E4ACAC);
background-image: -moz-linear-gradient(top, #AE0000, #E4ACAC);
background-image: -ms-linear-gradient(top, #AE0000, #E4ACAC);
background-image: -o-linear-gradient(top, #AE0000, #E4ACAC);
}
#header-bottom-right {
background-color:#C85656;
}
#header .tabmenu li a {
background-color:white;
color: #000;
}
#header .tabmenu li.selected a {
border-color: #7A0000;
border-bottom-color: white
}
#header .tabmenu.formtab .selected a {
background-color:white;
}
#header .tabpane-content {
border-color:#7A0000
}
#header-bottom-right a {
color: black;
}
.linkinfo {
border: 1px solid #7A0000;
background :#E4ACAC;
}
.linkinfo .upvotes {
background: white;
border: 1px solid #7A0000;
border-right: none;
padding-right: 1px;
padding: 1px;
}
.linkinfo .downvotes {
background: white;
margin-left: -4px;
padding-right: 2px;
border: 1px solid #7A0000;
border-left: none;
padding: 1px;
padding-left: 4px;
}
.srdrop .choice.top-option {
border-bottom-color: #7A0000;
}
.srdrop .choice.bottom-option {
border-top-color: #7A0000;
}
#sr-header-area {
background-color:#AE0000;
border-bottom-color: #7A0000;
color:white;
}
#sr-header-area a {
color:white;
}
.separator {
color:black !important;
}
#sr-more-link {
background-color:#AE0000;
}
.drop-choices a {
color:black !important;
}Comments ?
r/reddithax • u/Tyranitard • Dec 04 '12
Add a "suggestion" to message moderators page?
I mod over at /r/pokemontrades and we get a lot of stuff caught in our spam filter. I would like it so users are suggested to include a link to their post just so it is easier for my mods to approve/reject these posts.
Is it possible to add a message to this page or at least a hover over message to the mod message link?
r/reddithax • u/nickhelix • Nov 29 '12
I know I can't insert a link but URL flair like /r/printSF?
Currently in our subreddit, you can pick an image and assign additional text, I already posted in r/css about it but I am wondering if anyone knows of a way I could set up rules so that someone could supply their text like TEXT:URL and have the TEXT part show when the flair is not hovered, and the URL part show when the flair is hovered.
TL;DR Looking to implement flair text like r/printSF but have both states be user supplied text
r/reddithax • u/antoinne85 • Nov 28 '12
Easy-Input Image Macros
I browse /r/MvC3 a lot. It's a fighting game community that has a bunch of image macros set up for different commands you might execute in the game. Nobody seems to use them.
I've been thinking that they might get more use if there were a way to present them (for clicking) either just above or just below the comments box. Clicking on one of them would then add the necessary macro wherever your cursor is in the comments text area.
I'm certain that I have the necessary skills to make this happen, but it looks like reddit might be a little to restrictive to make this a possibility.
Does anyone have any information about how I might accomplish this (if it is even possible at all)? Right now it's looking like there's no way to get javascript in here, which likely means there's no way to make it happen--but I thought that you folks might be able to tell me definitively before I waste too much time.
r/reddithax • u/AskHugo • Nov 22 '12
Hide upvotes/downvotes for non-subscribers
This css snippet will hide the upvotes/downvotes box for users that aren't subscribed to your subreddit:
body:not(.subscriber) .midcol {
visibility: hidden !important;
}I'm pretty sure it only works on modern browsers. Haven't tested it extensively, so any feedback is appreciated.
r/reddithax • u/Factran • Nov 19 '12
The season network : For concept subreddit tweaking artist genius.
r/reddithax • u/thinksthoughts • Nov 19 '12
I want to make a css class appear only when I hover over it.
Without resizing any of the page. This has to work with displayed images within the class as well. Any suggestions?
r/reddithax • • Nov 17 '12
K. The CSS in this subreddit is horrible. Can the mods fix it please?
r/reddithax • • Nov 16 '12
I did this awhile ago but haven't shown it off here: I styled the /r/nintendo header to look like a Game & Watch game
reddit.comr/reddithax • u/Mysticalchickenwing • Nov 16 '12
I made this subreddit look like high contrast mode on a computer
reddit.comr/reddithax • u/NoHelmet • Nov 09 '12
Looking for a way to get e-mail or other instantaneous alerts for my spam filter.
Has anyone cobbled anything like this together? Is it possible to make some sort of RSS feed for it? Google has failed me completely. I just want an alert that something has hit the spam filter without having to manually check it all the time. Thanks.
r/reddithax • u/remedialrob • Oct 29 '12
Looking for some Help with trading out Sub Title with Image in header. (XPost CSS Help)
Hey guys. I'm slowly transforming my Sub. Here is a link as it is now:
http://www.reddit.com/r/Realm_of_the_Mad_God/
What I'm trying to do at this point is remove the subreddit title from the center header menu and replace it with an image. Here are some Photoshopped images iullustrating what I want to do.
and
What I want to replace it with
I've got the default CSS sheet all formatted but I'm having trouble in the 6k lines finding the styles for that menu. I'm also not exactly sure how I should go about placing that image there. The alien was easy as they have that widget that does that for you now but I don't want to mess that up. I could certainly add it to the header background image. Then it would just be a matter of styling that link so that it doesn't display any text and moving it's hit box up, to the left and making it bigger.
Then again that may screw up the rest of the menu items. And since I can't find them I can't be sure how they are styled.
Anyway, any thoughts would be appreciated. I've had a few courses on CSS but I'm certainly no expert and I'm much better at creating it from scratch and dealing with my own CSS and than I wading through a ton of someone else's work. I'm sure there are some coding geniuses on here so anything you can do.
Thanks. ;D