Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Perlmonks CSS font size hack

by xdg (Monsignor)
on Jul 30, 2004 at 18:40 UTC ( #378774=monkdiscuss: print w/ replies, xml ) Need Help??

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

tt font { font-size: 10pt; } ul font { font-size: 10pt; }

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.

Comment on Perlmonks CSS font size hack
Select or Download Code
Re: Perlmonks CSS font size hack
by chromatic (Archbishop) on Jul 30, 2004 at 19:00 UTC
    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.

      I'd love to donate time to it, if it comes together under the direction of a god/pmdev (I'm pretty solid with CSS neuter XHTML).

Re: Perlmonks CSS font size hack
by CloneArmyCommander (Friar) on Jul 30, 2004 at 20:41 UTC
    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.
Re: Perlmonks CSS font size hack
by Wassercrats on Jul 31, 2004 at 05:16 UTC
    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.

Re: Perlmonks CSS font size hack
by demerphq (Chancellor) on Aug 01, 2004 at 10:27 UTC

    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


Re: Perlmonks CSS font size hack
by ggg (Scribe) on Aug 02, 2004 at 00:23 UTC
    Here is another thread on that topic.
    ggg

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: monkdiscuss [id://378774]
Front-paged by ysth
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2014-08-30 23:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls