Classes not saving

  • Author
    Posts
  • #242566

    To create a recent post, editing in the HTML view, I had the scientific names of living things marked up thus `<span class=”biota”><i class=”bino
    minal”>Circus cyaneus</i></span>`, using the draft <a href=”http://microformats.org
    /wiki/species”>Species microformat.

    However, when I saved the post, the class="binominal" disappeared, though
    the class="biota" remained. Attempts to re-add it fare no better.

    Is there a reason for this; am I doing something, wrong, or is it a bug?

    #242818

    raincoaster
    Member

    Have you gotten this arrangement to work before? I haven’t seen it before, so I have to ask. Not all tags are accepted at WP.com.

    #242948

    No; but the tags are preserved, just not the classes.

    #242956

    deltafoxtrot
    Member

    It seems to me that the classes are saved for span and div elements and discarded for others. You may want to nest it like this

    <span class="biota"><span class="binominal" style="font-style:italic;">

    #242974

    Thank you for determining the cause and suggesting a work-around.

    Since italicisation conveys meaning in taxonomy (idicating that “this is a taxonomic name”) and not just presentation, it’s important to preseve that meannig when CSS is disabled, by using <>i. I have now found that <span class="biota"><span class="binominal"><i> works.

    The bug is significant , not least beacuse some microformats requre classses on particular elements, such as class="url" and class="email" on (mailto:) anchor links. I’ve looked for information on how to report bugs, but can’t find any – how is it done?

    #242975

    vivianpaige
    Member

    To report a bug, send it to support http://wordpress.com/contact-support/

    #242982

    Thank you. I’ve reported it. However, it seems that the same problem was acknowleged by WP – in 2006(!):

    https://en.forums.wordpress.com/topic.php?id=30971&replies=5

    #242983
    #243019

    deltafoxtrot
    Member

    @pigsonthewing, I wasn’t aware of the “classses on particular elements” thing. Thanks for updating me on that.

    #243058

    tisme
    Member

    > I’ve reported it. However, it seems that the same problem was acknowleged by WP – in 2006(!)

    Well, formatting flexibility has never been a high priority on .com; particular elements and their attributes get added (tag by tag) as people whine about it here or there.

    #243059

    raincoaster
    Member

    Quite frankly, it’s my opinion that they deliberately limit formatting capability so as to encourage those with more complex needs to go to independent hosting. The more flexibility, the more things that can go wrong, and this way the resources that Automattic needs to throw at WP.com are limited; with more options would come increased demands for support.

    #243071

    matt
    Staff

    This was fixed earlier today. You can now have classes on the i element.

    raincoaster, I don’t think that is an accurate characterization of our thoughts or motivations.

    #243072

    raincoaster
    Member

    No? Why not then? It would save you guys a lot of work. That’s certainly the way I’d do it if I were running the place.

    (astute observers will realize that Matt IS running the place and I am not)

    #243073

    andrew
    Member

    Well, most of the time, formatting is best done by CSS. So providing a CSS upgrade for those to whom formatting is important seems like a good way to go.
    By the way,the issue with which pigsonthewing initiated this topic is not just one of formatting, as one of his subsequent posts explains.
    Interesting topic, and one that certainly makes a change from AdSense – thanks!

    #243106

    tisme
    Member

    frankly, I would rather prefer to have classes (or better yet inline) styles on DL, DT, DT elements than on legacy font style elements.

    or how I’m supposed to center captions of images which are not in the post gallery (for some reasons) then?

    and yes, strictly speaking, the OP issue is indeed more about markup than formatting. but to apply a desired format (style actually) via CSS one have to set up a proper markup first. if the latter gets stripped off by the ‘paranoid filters’ then CSS won’t do anyway.

    also, the wording ‘formatting flexibility’ was used just for a consistence with the post in the topic linked.

The topic ‘Classes not saving’ is closed to new replies.