Closed GoogleCodeExporter closed 8 years ago
Thanks. Since prettify is supposed to be embeddable, I don't think there's any
way I could add that to the trunk version without violating the HTML 5 mandate
> These attributes are not intended for use by software that is independent of
the site that uses the attributes.
from
http://www.w3.org/TR/html5/elements.html#embedding-custom-non-visible-data-with-
the-data-attributes
Original comment by mikesamuel@gmail.com
on 19 Jul 2011 at 3:59
Interesting. I wasn't aware of that section. Thanks for the explanation and
link.
That being said, how is putting the line number as a data attribute different
than putting L0 - L9 as a class? I realize the class has nothing to do with the
HTML5 mandate (data-* attributes specifically), but still. Just curious.
Thanks again.
Original comment by mattcr...@gmail.com
on 20 Jul 2011 at 8:43
There is no explicit prohibition in the HTML 5 spec that specifies how software
independent of the site may specify classes. Instead, the HTML 5 spec actually
recommends their use for carrying site-independent semantic info :
http://dev.w3.org/html5/spec-author-view/the-code-element.html says "e.g. so
that syntax highlighting scripts can use the right rules, may do so by adding a
class prefixed with "language-" to the element."
There may also be a backwards compatibility issue.
Presumably any software that includes google-code-prettify is already
comfortable with its use of classes, but adding data-* attributes might break
sites that rely on the spec quote above and use data-* for site-dependent info.
Original comment by mikesamuel@gmail.com
on 21 Jul 2011 at 8:09
Original issue reported on code.google.com by
mattcr...@gmail.com
on 18 Jul 2011 at 7:55