in reply to Re: More CSS-friendly formatting on PerlMonks? (code)
in thread More CSS-friendly formatting on PerlMonks?

Hm, I didn't look at the PREs closely enough. Yep, it has <pre><tt class="code">. That's not great, but it's actionable. The node you refer asks someone to come up with a suitable class for inline perlmonkish CODE tags.

Personally, I think it'd be best if it used pre.code for multiple lines and tt.code for inline use. This would allow common features of .code to be common, and special features of pre or tt to be layered atop that.

Should I start exploring how to code on this system? I know this site shares the engine with others, so I expect there's some push-back against sudden inspirations and hacks to the core functionality.

--
[ e d @ h a l l e y . c c ]

  • Comment on Re: Re: More CSS-friendly formatting on PerlMonks? (code)

Replies are listed 'Best First'.
Re^3: More CSS-friendly formatting on PerlMonks? (no PRE)
by tye (Sage) on May 01, 2003 at 22:29 UTC

    Go read that thread. Not all choices of displaying code on PM use PRE tags. There are no PRE tags around code when I view it, even for multi-line code blocks.

    The CSS for code blocks is not part of the core functionality of the site. It is part of the subroutine (well code node) that handles CODE tags here. What class="X" to use doesn't really require programming. We just need to decide and then the change to the code is trivial.

                    - tye

      The TT tag, unfortunately, is not the best way to CSS-style a multi-line block. (That's why PRE is a part of HTML, even if your Monk options don't use them.) When I try to outline and background a multiline TT block on a Mozilla-based browser, each line has its own overlapping rectangle of varying widths (because TT is a character formatter, not a block formatter). Outlining the PRE does the right thing: one rectangle fitting the widest line.

      There seems to be a long way to go for the whole site to be generically skinned. Followups in a thread use a lot of html-coded BGCOLOR values. The use of containers instead of bordering in the CSS makes some adjustments far less simple.

      Oh well. It was a lark, anyway. I tweaked some colors and hoverable links to my liking, and that's what I was going for. Just because I can't restyle the nodelets and thread replies doesn't chase me away or anything.

      --
      [ e d @ h a l l e y . c c ]

        It is my impression that at least a few other browsers don't have this "problem". But I don't know much of anything about CSS and had almost nothing to do with the CSS on the site.

        Would a SPAN work better? If Mozilla will only do it correctly with a block element, then it could be PRE in some cases and P in others. That seems like a pain, though.

                        - tye