Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^4: Approved PM markup?

by ambrus (Abbot)
on Jun 28, 2015 at 21:43 UTC ( #1132410=note: print w/replies, xml ) Need Help??

in reply to Re^3: Approved PM markup?
in thread Approved PM markup?

Very well, since you ask me explicitly. The following is my belief, and need not reflect the gods' official standing.

The way some attributes are allowed on some elements but not all is inconsistent, yes, but I also didn't find it too important. You may try to petition us with a complete proposal of what attributes to enable in what elements, and then maybe I'll write a patch and maybe some god will apply it. (Update: nuh-uh, sorry, I won't write that patch, for the technical reason (if you're not a pmdev then you might not understand this) that it would have to be a patch to a setting, and I hate setting patches, because the gods keep applying other patches before them, and the perlmonks interface makes it practically impossible to diff and merge setting sanely.)

But the style attribute, that's disabled deliberately, and we'll never enable it, ever. Don't dream of it. Allowing arbitrary CSS styles on your elements lets a post attempt to take over infrastructure parts of the perlmonks page, such as covering the nodelets or vote buttons by fake elements. The results of a post that tries that could be anything from mischieveous and disrupting to downright evil and destructive. This can even get more powerful in the future as more and more things become possible with CSS in browsers every year. The only way we could support custom styling is if we explicitly filtered custom styles in posts, but I don't think we want to implement that.

Update: as for syntax highlighting, (a) I would not like to see people control that in their posts, because I personally don't like syntax highlighting and I think it's the viewers that should decide whether they want syntax highlighting, not the poster, so unless you're doing this on your homenode or scratchpad, please just don't do it, and (b) if you want to highlight stuff, you can already do that with classes for which the viewer enables rules in their personal CSS, and (c) if you really want to force highlighted text on the reader to make a point, use the color attribute of the font tag.

Replies are listed 'Best First'.
Re^5: Approved PM markup?
by kcott (Bishop) on Jun 29, 2015 at 13:23 UTC

    Your points about CSS are all valid - no problem.

    I've added a post requesting discussion of allowed HTML: Additions to Approved HTML. What I've posted constitutes what I would have proposed; however, as stated in that post, I think concensus across the Monastery is important. I'll await feedback and then modify as appropriate to form a proposal that most agree on (or can, at least, live with).

    As far as syntax-highlighting is concerned, I was really only providing an example contrasting the style element with the style attribute. The example could just as easily have focussed on some other aspect of styling. The script I mentioned doesn't operate on Perl, it's just written in Perl; if interested, see Syntax-highlight Non-Perl Code for HTML. Given your points about CSS, this is now entirely moot (at least with respect to PerlMonks markup).

    -- Ken

Re^5: Approved PM markup?
by Anonymous Monk on Jun 28, 2015 at 21:54 UTC

    (c) if you really want to force highlighted text on the reader to make a point, use the color attribute of the font tag.

    But be aware that it might match the background color of users theme ... so at that point why even bother:
    Q: The parts I need help with are highlighted in green
    B: I use the green theme, all the text is already green, who which parts do you need help with?

      Yes. And our rules allow you to force even background color on the viewer. Which they can then try to override with CSS or other client-side stuff.

      All that fancy markup is probably useful only

      • on homenodes,
      • in old posts from before spoiler tags that used background color and font color to hide spoilers,
      • and in a few posts of eyepopslikeamosquito (but don't even think of copying him).
      We want to keep supporting some of those uses unless it causes too much problems. If someone wants to make their posts unreadable, there'll always be ways for that, and I don't think there's much point trying to fix that by banning particular attributes unless a particular sort of abuse gets too common.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1132410]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2021-10-21 23:13 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (85 votes). Check out past polls.