I got tired of squinting at the tiny fonts that were rendering in my browser on Perlmonks and decided to try to fix it with some on-site CSS markup on my User Settings page. This turned out to be harder than I expected, but along the way I discovered an interesting hack that some people might find useful.

Much of the problem with setting font sizes on Perlmonks seems due to the fact that there are FONT elements sprinkled throughout the HTML source that override CSS styles put on elements like <p> and <td>. It's further compounded by the fact that individual posters may or may not post properly formatted HTML.

An interesting hack I found (at least on Firefox and IE6) is that you can apply a CSS style to a FONT element! This allows code like the following

to override the font size settings on markup in the HTML like <tt><font size="-1"> (used for code) and <ul><font size="2"> (used for replies).

Separately (and perhaps this should be a separate PM Discussion post), in searching archives for CSS related nodes, it looks like there hasn't been any discussion since about 2003 on bringing PM up to date with (X)HTML/CSS standards (and eliminating non-CSS styling in the HTML). Currently, PM fails to even validate as proper HTML 4.0 Transitional as given in the DTD. (c.f.
Perlmonks W3C Validation.) Maybe it's time to refresh that conversation since presumably, the old Netscape 4 holdouts have moved on to more modern browsers.

-xdg

Code posted by xdg on PerlMonks is public domain. It has no warranties, express or implied. Posted code may not have been tested. Use at your own risk.

Maybe it's time to refresh that conversation since presumably, the old Netscape 4 holdouts have moved on to more modern browsers.

I'd rather not revisit any conversations about this, unless the conversation starts with someone saying "Here's a patch." It's a good idea, so one or two people need to do it instead of multiple people talking about it and not doing anything.

Isn't there a Perl Module built to reformat code to XHTML standards. I think I have a copy somewhere I would be willing to dig up. I personally think that it would be too much of a hassle for somebody to be stuck with rewriting everything to comply with XHTML standards, especially since everything seems to be working fine.

I don't care about being able to control the CSS. The font sizes and everything else should be proper in the first place. The font sizes aren't that bad for me, except for some blocks of code and the CB text, which should both be one point larger. The bigger problem is that HTML is required for these posts. Also, all of the ideas here should be implemented. And in general, Perl Monks is ugly. Use whatever code and HTML works, valid or not, as long as it doesn't hurt me.

Update...I was just reminded of the small font size of the replies, which is smaller than the top post. That's dumb. Make the reply text one point larger too.

The simple, clean, and customizable layout is what more sites should aspire to have. Simplicity and utility is beautiful. And there isn't a current browser out there that doesn't allow you to toggle the font sizes up and down all you want with a keystroke or two.

Its an interesting project to clean the PM output. Code is scattered in a lot of places and without a rigorous project to eliminate it you'll have to put up with the current approach: As and when pmdev touches a node for some reason we usually do an HTML cleanup at the same time.

As for converting everything over to use CSS, I think thats a policy change that hasn't occured yet. OTOH, im sure there are ways to make the page much easier to manage via CSS without compromising the "old look". pmdev lacks a guidline document on that, and as such we just do what seems most sensible. We also dont have a list of used class names, or the like. Theres a couple of projects that could be interesting for someone. Anyone interested in the CSS guidelines should speak with petruchio though.

---
demerphq

First they ignore you, then they laugh at you, then they fight you, then you win.
-- Gandhi

When putting a smiley right before a closing parenthesis, do you:

Use two parentheses: (Like this: :) )
Use one parenthesis: (Like this: :)
Reverse direction of the smiley: (Like this: (: )
Use angle/square brackets instead of parentheses
Use C-style commenting to set the smiley off from the closing parenthesis
Make the smiley a dunce: (:>
I disapprove of emoticons
Other