r/csshelp • • Dec 27 '11

Looking for help with /r/spacedicks

As you might know, we enjoy our use of capital letters over in /r/spacedicks. With this in mind I've set the subreddit to automatically capitalize everything.

As you can imagine this poses a problem when posting links, as the link is broken when forced to display only capital letters (this can be bypassed by submitting links to spacedicks from another subreddit, but links in comments are always doomed). I was wondering what I could do to make an exemption every time 'http://' shows up.

Thanks heaps!

7 Upvotes

11 comments sorted by

8

u/[deleted] Dec 27 '11

No

16

u/I_RAPE_CATS Dec 27 '11

I'M GOING TO POOP ON YOUR DICK FAGET

3

u/alexbarrett Dec 30 '11

We've had this problem over at /r/rainbowbar (and fixed it, although I think the issue has since resurfaced).

The capitalisation doesn't affect the links once they're posted, just the text fields when they're being filled in. Add text-transform: none exceptions to the relevant form fields (the URL field and the comment field) and it should stop happening.

3

u/I_RAPE_CATS Dec 30 '11

Wicked! Thanks man!

1

u/alexbarrett Dec 30 '11

No problem. The comments will still be displayed in uppercase once they are submitted, it just won't look that way in the comment box.

5

u/jamt9000 Dec 27 '11

If it's just a style it shouldn't affect links

2

u/[deleted] Dec 27 '11

From my pretty limited knowledge of CSS this would be impossible within the constraints of reddit. You would need each link string to be it's own class (or at least have an ID) so that you could apply separate style to it.

You can't add classes when all you have is CSS to play with. If we could edit the python(not entirely sure if that's what reddit uses) used to generate pages it would be pretty trivial.

CSS also doesn't have logic or a way to parse text and interpret it since it's not actually a programming language.

2

u/jdwpom Dec 27 '11 edited Dec 27 '11

If the input box is its own class, we could modify our current CSS

 .link {
 text-transform: NONE !important
 }
 body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, p, blockquote, th, td, iframe {
 margin: 0;
 padding: 0;
 text-transform: uppercase
 }

couldn't we? I can only presume that it's somewhere in that giant list of things that's named. Guess we'll just have to twiddle with it until we find something that works.

Edit: I don't know why the 'four spaces makes code' thing isn't working. Edit: Fixed. Needed a double newline.

2

u/[deleted] Dec 27 '11

Ahh yes, messing around with .link could do it. That would make every link not get uppercased though. Including stuff on the submitted page.

I think the issue in not with the text on the link it's that the actual link itself gets caps'd and as such breaks some of the links. I'm not entirely sure though.

2

u/jdwpom Dec 27 '11

I've had a quick mess-about (I should really whip up a testing subreddit for this sort of thing). Basically, you can type things into the box by hand, and they come up in 'normal' case, but trying to paste something in results in allcaps. My current guess is that it's something to do with us messing around with 'div', but I don't know enough CSS to really be able to make much headway here.

2

u/[deleted] Dec 27 '11

Yep, you're right. Definitely make a test sub, I do all of my fiddling around in a corner of reddit where I can just see what does what. If you type in the link by hand it works fine, if you copy paste it the link address gets caps'd, which kills the link.

I've tested around with a few different things and this seems really problematic. Even doing a text-transform to lowercase doesn't do it correctly on copy-paste. I can say though that the .usertext class seems to be irrelevant.