Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Additions to Approved HTML

by ww (Archbishop)
on Jun 29, 2015 at 13:05 UTC ( [id://1132448]=note: print w/replies, xml ) Need Help??


in reply to Additions to Approved HTML

This is to register general agreement with kcotts OP... while acknowledging the general accuracy of the first reply from an AnonyMonk.

That said, I favor making the non-standard elements like <code> tags accept attributes in a manner as close as possible to w3c standards; IOW,

<code uni="1"> and <spoiler title="...">

I, for one, would particularly like to be permit use of color, strike, size, etc. (using a <span class=... or <span style=...) inside code tags to facilitate highlighting (and permit more concise snippets).Yeah, sure, the use of comments to call attention to an error or suggested change works (well "sorta' works") but often only at the expense of extra lines or lines that exceed screen widths of some users.

PM's stated aversion to <br> is something I've never agreed with or understood. Is there some wise monk who'll explain that? (I included it when writing Markup... only because I'd been chastised as a newbie for using break tags.)

Aside: perhaps modification efforts should also be directed to PM's handling of <br /> which Perl Monks Approved HTML tags appears to countenance but which generates an error indication when HTML preview error reporting is set to 4).

Here's an example: =>
-- NB: the XHTML form follows the => & precedes this statement but the base form [ without a slash] follows. The XHTML form appears fairly often -- possibly used by authors for whom it's the norm. (For those seekign a non-authoritative but compact explanation, an XHTML trott from U of Wash. offers this:

A few tags are called non-container tags, because they don't contain any content - they stand alone. Examples are images and line breaks. XHTML requires that all open tags must be closed, even if they're not container tags. Therefore, non-container tags end in />. For example, the tag for a line break is <br />.

Another aside: someone recently suggested (in the CB?) that we'd be well served by automating insertion of code tags around anything that looks like data or code before the preview stage of creating a new post. (Caveat: I have no idea of how to code an implementation nor any intent to try to do so anytime soon!)

IIRC, the bold, big and (sup or sub) tags also sometimes behave oddly when combined. This may be only in special cases and I have not been able to conjure up an illustration right now.

Replies are listed 'Best First'.
Re^2: Additions to Approved HTML
by kcott (Archbishop) on Jun 29, 2015 at 17:49 UTC

    Thanks for registering your general agreement, ww. ++

    When considering the "<code uni="1">" and "<code uni>" forms, I chose the latter for reasons of brevity and, therefore, esae of use. The W3C Standards (for HTML4) do include examples of this form; for instance, checked and disabled. Your preference for "<code uni="1">" is noted and will be taken into account with other feedback I receive.

    Referring back to ambrus' post (Re^4: Approved PM markup?), you'll see that embedded CSS (via the style element or style attributes) will not be allowed, so I won't be proposing "<span style=..." at all. Similarly, from the same post, "<span class=..." within code tags, would allow syntax-highlighting, so that's off the table as well.

    Regarding br, that's a modification so I won't be including it in the proposal. I believe if I keep the proposal tight, i.e. just to additions, I'm more likely to get somewhere with this, than I would if I allowed feature-creep. Having said that, should you wish to make a separate proposal, for instance, "allow br inside p blocks but continue to discourage its use as an alternative to using p blocks", I would certainly support that.

    -- Ken

      OK, re-read Re^4: Approved PM markup? but should not have needed to had I read more carefully before.

      However, just as we implemented non-standard tags -- <code> etc -- skilled individuals could, I suspect, implement equivalents for a limited variety of style-attribute-equivalents -- .red, .green. etc. Creating a few of those would go a long way, IMO, to making it possible to highlight important subject matter in ways that would enhance communication other than <>;font>; <b>; <em>; <big> etc.

      As things stand now, explaining some issues appearing in CODE requires lengthy notes pointing out that problem x at line such-and-such in your original creates problems at... at a remove from the problem (i.e., in the narrative rather than the code) or requires an extended comment in the code section, interrupting the flow.

      My intent re span is NOT TO PROVIDE SYNTAX HIGHLIGHTING but rather to provide non-standard tag -- say <note> maybe -- as a means to create a visibly distinct rendering for comments inserted inside code tags without the limitations of using the hash_sign or pod markup.

      As to <br>, you invited general comments. My thoughts on that were clearly an aside for the community reading your (++ed) thoughts.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-23 15:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found