This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Live
PTR
10.2.5
PTR
10.2.6
[Suggestion] [code] tag CSS
Post Reply
Return to board index
Post by
AnrDaemon
How about just add "select all" pimp to the code box, as it is done on many other forums?
Post by
Malgayne
I'll see what we can do.
Post by
pelf
I'll see what we can do.
Thanks for the blue tag :).
Post by
TheOnyx
This enhancement to the code tag has been implemented. As always, Wowhead strives to bring you the best possible browsing experience possible and will always aim to never give you up, never let you down, never run around and desert you.
Post by
pelf
Aww, thanks guys. I know you're busy and had to divert for a bit to change this. The UI&M denizens will appreciate it.
EDIT
: Well, crap. I gave you bad advice. Using the value
normal
actually breaks the whitespace preservation while also enabling auto-wrapping. It turns out the right one is
pre-wrap
.
Firebug this code block and change
normal
to
pre-wrap
and you'll see both of them working correctly at the same time.
Space out and with tabs! more! long line!11111111111111111 111111111 1111111111111 111111111111111 111111111 1111111 1111111111111111 1111111111 1111111 111111111
I'm sorry.
Post by
Skyfire
Aww, thanks guys. I know you're busy and had to divert for a bit to change this. The UI&M denizens will appreciate it.
EDIT
: Well, crap. I gave you bad advice. Using the value
normal
actually breaks the whitespace preservation while also enabling auto-wrapping. It turns out the right one is
pre-wrap
.
Firebug this code block and change
normal
to
pre-wrap
and you'll see both of them working correctly at the same time.
Space out and with tabs! more! long line!11111111111111111 111111111 1111111111111 111111111111111 111111111 1111111 1111111111111111 1111111111 1111111 111111111
I'm sorry.
As I said before, pre-wrap is CSS3. I knew that this would happen. -.-
I think there are vendor specific properties for pre-wrap as well. Of course, the only browser that won't recognize it is IE, but that's alright, as IE will just fall back to whatever else we've added to the CSS.
Post by
pelf
Yeah. Well, of the two ... I'm not even sure which I'd prefer. If I can't have both I would probably prefer the whitespace preservation, but I think there are more people who want the wrapping over that. If the fallback does actually work and IE will do it the
normal
way and firefox and anything supporting the 3 stuff will do it the
pre-wrap
way, then that's optimal, for sure.
Though, given a bit more robust configurability for the \ tag, preserving whitespace in a code block is less and less useful. For now, you have to know the CSS class to give the \ tag and there aren't really any that do what I want, usually -- so I end up making my own tables in the \ blocks.
Post by
Corveroth
Since the primary use of the code tag on these forums is macros (I assume), and in macros, whitespace, readability, and any number of good coding practices are frequently sacrificed on the altar of the character limit... how often is preserving whitespace an issue?
Post by
Skosiris
Changed to pre-wrap. Thanks for the feedback :D
Post by
pelf
Since the primary use of the code tag on these forums is macros (I assume), and in macros, whitespace, readability, and any number of good coding practices are frequently sacrificed on the altar of the character limit... how often is preserving whitespace an issue?
Yeah, that was my thought on it. Like I said, with a better \ tag, wanting to use \ to fake tables becomes less and less appealing.
Changed to pre-wrap. Thanks for the feedback :D
Cool. I can't see what that looks like in IE as they (yes, I'm serious) still have IE 6 on the standard image most of us are using at work. 6 renders the page massively wide so it's not wrapping anyway.
Thanks for the time, guys.
Post by
Skyfire
Changed to pre-wrap. Thanks for the feedback :D
Cool. I can't see what that looks like in IE as they (yes, I'm serious) still have IE 6 on the standard image most of us are using at work. 6 renders the page massively wide so it's not wrapping anyway.
Thanks for the time, guys.
Well, we could include a "non-standard CSS selector" that IE5.5+ will render which would get rid of the pre problem...
Post by
Wanderingfox
Yay
it
works
now!
Post Reply
You are not logged in. Please
log in
to post a reply or
register
if you don't already have an account.