#microformats 2019-11-03
2019-11-03 UTC
[tantek], [grantcodes], [jgmac1106], gRegorLove, [dougbeal], bitwinery, cyr-_, cyr-, [Michael_Beckwit, polaeboa, [LewisCowles], Kaja__, galaxie, [fluffy], [tonz], [frank], [Kasper_Nymand], [chrisbergr], [snarfed], [manton], [chrisaldrich], TrevorDiscord[m] and KartikPrabhu joined the channel
# @duffy0 ↩️ @destroytoday I agree on the avoiding url shorteners, but I like the idea around h-cards, microformats and rss. (twitter.com/_/status/1191095708343914497)
# aaronpk I can never remember, is there a wiki page that answers this? https://twitter.com/destroytoday/status/1191096764784361479
# aaronpk there's all sorts of details at http://microformats.org/wiki/faq#Class_semantics but there doesn't seem to be an answer to the higher level question
[tonz], bitwinery and [snarfed] joined the channel
# KartikPrabhu I mean why use attributes instead of class names?
# KartikPrabhu also data-* attributes are explicitly not for this use-case. see: https://adactio.com/notes/16046
aeddi[m], nofwayyDiscord[m, eshohetDiscord[m, cesarosumDiscord, test123Discord[m, leoalvarezhDisco, bekoDiscord[m], twisted`, Phae, gRegorLove_, gRegorLove__ and [manton] joined the channel
# [LewisCowles] The spec is advice whilst we (thankfully) have permissive parsers. xhtml is one example of what fixating on strictness to a focus-group human-authored document promoted. A better take-down than a spec is IMO what you get for free with CSS classes. Styling can hang off the same markers as behaviour does, keeping the markup simpler.
# KartikPrabhu no! do not use mf2 classes for styles
# KartikPrabhu and no one said classes are exclusively for styling anyway
# [LewisCowles] what do you think they are for? I have the living spec on bookmark and have been with html prior to css and class existing. It came in with HTML3
# KartikPrabhu you can style using any HTML attribute not just classes
# KartikPrabhu so classes are not exclusively for styling
# KartikPrabhu if you have a citation for where it says anything like "use class only for styles" then I will reconsider
# KartikPrabhu in fact here is a quote "but authors are encouraged to use values that describe the nature of the content, rather than values that describe the desired presentation of the content." from https://html.spec.whatwg.org/multipage/dom.html#classes
# [LewisCowles] > HTML 3.0 relies on linked style info to give authors control over the appearence of documents. Such info is placed in a linked style sheet, or as overrides in the HTML document head, using the STYLE element. The generic CLASS attribute can be used to subclass elements when you want to use a different style from normal, e.g. you might use <h2 class=bigcaps> for headers with enlarged capital letters. Note that the class attribute has a
# [LewisCowles] wider scope than just style changes, e.g. browsers could provide the means for searching through documents, restricting search according to element class values.
# [LewisCowles] Not a single other practical use-case is spelled out, other than styling. The others whilst possible, all require active scripting and are not supported by browsers, unlike ID element fragment selection
# [LewisCowles] I did suggest a benefit would be to use it for styling and scripting, however if you are stating that it has other benefits, I'd like to know what they are?
# [jgmac1106] its dinner now but I have Tantek's classic article bookmarked on this
# [jgmac1106] Charlie ran a session somewhere once on using <data> g2g...
# [LewisCowles] I'm most interested in Kartik's. I have read https://tantek.com/2012/353/b1/why-html-classes-css-class-selectors if that is the article.
# [LewisCowles] If styling is not a benefit, then it's largely academic and not much use to put so many uses all into one attribute field, leading to the need to write articles disambiguating various uses
# [LewisCowles] in any case mostly just upset that there is bike-shedding when many on twitter ask this question they are not given reasons, but seem to be laughed off, pointed at article references that are not urls
[tantek] joined the channel
# [LewisCowles] 3.2 i've only got really awful looking links for https://www.w3.org/TR/2018/SPSD-html32-20180315/#dtd
# [LewisCowles] It has the following
# [LewisCowles] > ID, CLASS and STYLE attributes are not included in this version of HTML.
# KartikPrabhu styling is a benefit of using classes. But classes can be used for other purposes like mf2. Coupling mf2 classes with presentational classes is a bad idea since you are coupling different purposes (from experience of my own). And mf2 classes are useful for other things like most indieweb stuff
# KartikPrabhu if you like to uses classes only for presentational styles then fine. go ahead
# [LewisCowles] It goes on to talk about link for stylesheets... very confusing
# [LewisCowles] Kartik, that was never my position.
# KartikPrabhu then I don't know what the argument is
# [LewisCowles] The argument was that when asking why classes, the only tangible argument I could think of, would be that you CAN (not have to) hang CSS and Behaviour off the same tiny part of an attribute. Whilst you can target other things for this, they lack CSS specificity benefits, which classes bring.
# [LewisCowles] The spec is intangible, it's as useful as quoting religious scripture, as was mentioned a moment ago about browser vendors doing their own thing
# KartikPrabhu oh well
# KartikPrabhu and my point is that is a bad argument, since coupling mf2 classes to styles gets very unwieldy and causes your styles to break if you move around mf2 classes
# KartikPrabhu classes can be used for other purposes, in this case mf2 markup. If someone does not like that then fine
# KartikPrabhu the tangible use-case is the things indieweb uses mf2 for. replies, webmentions etc....
# KartikPrabhu if someone wants to do those with out classes then again, go ahead