Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Size of text in replies when showing threads

by jdporter (Canon)
on Nov 13, 2009 at 00:02 UTC ( #806834=monkdiscuss: print w/ replies, xml ) Need Help??

Moderately observant readers will no doubt have noticed that, when viewing any "thread" (a node and its replies), the replies are displayed in a font smaller than the top node. It is being done with a hard-coded <font size="-1"> in HTML.

This has been done since time immemorial, but we're not ones to be enslaved to tradition. There has been some commotion, over the years, to eliminate this hard-coded font size setting. Users who want to do something special with their font sizes should be free to adjust their on-site CSS to do so.

Before we eliminate this rather inflexible style enforcement... Does anyone have any arguments why it should not (or should) be done?

Comment on Size of text in replies when showing threads
Download Code
Re: Size of text in replies when showing threads
by Anonymous Monk on Nov 13, 2009 at 00:46 UTC
    Since replies are already indented, making text smaller just makes it harder to read, so I say get rid of smaller text sizes, its a good thing.
Re: Size of text in replies when showing threads
by ambrus (Abbot) on Nov 13, 2009 at 07:16 UTC

    This has bothered me for ages so I've overridden it with user CSS. It wasn't easy to figure out the right incantation, it's this:

    tr.reply-body ul.indent font[size="2"] { font-size: 100% }

    I'm mentioning this in case anyone wants to write a rule to emulate the old behaviour.

Re: Size of text in replies when showing threads
by roho (Monsignor) on Nov 13, 2009 at 16:36 UTC
    I agree with removing smaller text. It makes reading code particularly difficult.

    "Its not how hard you work, its how much you get done."

      Have you gone to display settings and enabled the "large code font" option? That actually removes an instance of "<font size='-1'>" that gets wrapped around each code block by default.

      One day that should go away as well. Those who don't like the "same size" code that appears "bigger" (because fixed-width fonts end up being noticeably wider) can adjust such using custom CSS rather than a user option implemented using old-school font resizing tags.

      Similarly, those who like reply text being a notch smaller (as has long been the case) should feel free to add their own CSS to make that happen (after the proposed change). I'm not in favor of adding CSS to try to emulate the current <font size='-1'> because I don't believe CSS can fully emulate that across all environments. Certainly, it will be easy for individual users to pick precisely the font size they desire with custom CSS.

      So we should document how to update custom CSS to get something that is likely to be similar to the old rendering for most situations and that can easily be adjusted by people. Perhaps the following is close to such:

      tr.reply-body ul.indent { font-size: 80% }

      If that isn't close, please propose something closer for others to iterate. Though perhaps a new div and class are in order here?

      - tye        

        Sadly tr.reply-body ul.indent { font-size: 80% } won't work, because that applies doubly to replies of replies so the font of those is set even smaller, so deep threads get very unreadable. The old font tag worked because it set an absolute font size, whereas the "80%" in CSS is relative to the parent.

Re: Size of text in replies when showing threads
by CountZero (Bishop) on Nov 13, 2009 at 18:08 UTC
    I do not agree with removing the smaller text for the replies, but I do agree to remove the font size setting from the HTML to the CSS.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      What he said.

      I actually like the smaller text. I would just like to see more width used, so code isn't broken before character 72 or so.

      23" rulez :)


      Enjoy, Have FUN! H.Merijn
        Can you please tell me how far your head is from your monitor at the moment? Are you leaning in? :)
        ...and are you one of those fortunate souls upon whom neither astrigmatism nor age has inflicted your vision?

        So I take it you have never visited display settings. Pick whatever code width you prefer.

        - tye        

Re: Size of text in replies when showing threads
by jdporter (Canon) on Nov 30, 2009 at 20:49 UTC

    OK.... As announced recently in Tidings, this change has been made.

    If you like replies being rendered in smaller text than the displayed root, try putting the following in your on-site CSS. It seems to work fairly well, at least on some browsers, such as Firefox.

    td.reply-body { font-size: smaller; }
    What is the sound of Windows? Is it not the sound of a wall upon which people have smashed their heads... all the way through?

      Heh, now when viewing a non-root node that has replies, the node being viewed is rendered in a smaller(-looking) font than that used for the (deeper) replies (both in IceWeasel and FireFox 3.5.5; for me both as tye and as tye&nbsp;, which use different themes and one of which has almost no custom CSS but neither have font-altering CSS outside of signatures and when AnonyMonk). That is unfortunate.

      - tye        

        This has been fixed. It was due to a CSS setting in /css/common.css, which means it was visible in all of the perlmonks "themes" (not including "No Theme", which has no CSS).
        Note that you may need to refresh your browser-cached copy of /css/common.css to see the change.

        The specific CSS code was:

        div.notetext { font-size: small }
        So if you decide you want to dink with the appearance of a reply when it is the displayed thread "root", use div.notetext.

        Thanks for noticing this, tye.

        Update: On a related note, the styling (font size setting) of the "Reputation" part of note display — that's the part that shows the ++ and -- buttons, or the current reputation if you've already voted — has been changed from a hard-coded <font size="1"> to CSS. The styling in common.css is:

        div.reputation { font-size: smaller }
        in case you'd like to override that in your Display Settings (or set it to something at all, if you're using No Theme).

        What is the sound of Windows? Is it not the sound of a wall upon which people have smashed their heads... all the way through?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (18)
As of 2014-08-01 13:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (20 votes), past polls