Live data from Hacker News

Microformats Wiki

microformats.org

31–40 of 69 posts

Re: Microformats Wiki

#31

Earlier quoted context omitted.

I'd argue that using the `class` attribute for describing the content of a field is overloading it, and that it should only be used for linking to CSS styles. You're better off using another attribute, e.g. some data-* attribute, for semantic information.

The HTML Standard disagrees: > […] authors are encouraged to use values that describe the nature of the content, rather than values that describe the desired presentation of the content. [*]: https://html.spec.whatwg.org/multipage/dom.html#global-attri...

That ship has already sailed if you're using Tailwind though.

Re: Microformats Wiki

#32
post #21

Both Mastodon and Tumblr have microformats support built in. Twitter and Facebook used to, but they decided they'd rather be silos than protocols

Can you expand on this ? I'd be more impressed by microformats if the microformats website could parse a DTD or schema and launch a structured editor for it.

Re: Microformats Wiki

#33
post #6

PSA: the best way to enable Microformat-like stuff with almost no effort is to keep describing content with reasonable class names even if you never pay any special attention to the microformats.org standards. One unfortunate side effect of things like Tailwind CSS is that some folks with a single-minded focus on looks are now using only the Tailwind class names, but you can do both. If before you'd have written some…

Or you can spit out the important stuff from the state (or model) as JSON and chuck that in a div?

Re: Microformats Wiki

#34
post #8

Earlier quoted context omitted.

I keep finding these when I least expect it and they've been fantastic every time - it usually means whatever I'm trying to automate is 90% solved for me. Scraping recipes from the bbc, flight reservations from my email, etc. If something includes schema.org/RsvpAction it probably needs to be actioned, if something contains schema.org/DiscountOffer it can probably go in the Noise folder. If someone starts sending spa…

I've gotten spam calendar appointments that my email client has helpfully added to my calendar so that I'm helpfully reminded of their spam sometime in the future with a push notification.

Good grief that has to be confusing. I'm often temporarily baffled by legit entries when notified, letalone strange or unexpected spam entries :)

Re: Microformats Wiki

#35

Google prefers JSON-LD though[0]. Also I'm not keen on defining content with styling classes. [0] https://www.searchenginejournal.com/google-structured-data-p...

As mentioned in https://www.jvt.me/posts/2020/03/02/google-microformats-supp... Microformats are still a recommended route

Re: Microformats Wiki

#37
post #31

Earlier quoted context omitted.

The HTML Standard disagrees: > […] authors are encouraged to use values that describe the nature of the content, rather than values that describe the desired presentation of the content. [*]: https://html.spec.whatwg.org/multipage/dom.html#global-attri...

That ship has already sailed if you're using Tailwind though.

Solution: don't use Tailwind.

Re: Microformats Wiki

#38

Earlier quoted context omitted.

The class attribute isn't just for styling though. See https://html.spec.whatwg.org/multipage/dom.html#global-attri... > authors are encouraged to use values that describe the nature of the content, rather than values that describe the desired presentation of the content.

> values that describe the nature of the content vs > rather than values that describe the desired presentation of the content. Or could it be that the meaning here is that you should write descriptive classes such as 'alert-box' instead of 'red-box'.

But that gets your "not just for styling" property for free — now another component can use the knowledge that the element is an alert box.

Re: Microformats Wiki

#39

Earlier quoted context omitted.

I'd argue that using the `class` attribute for describing the content of a field is overloading it, and that it should only be used for linking to CSS styles. You're better off using another attribute, e.g. some data-* attribute, for semantic information.

The HTML Standard disagrees: > […] authors are encouraged to use values that describe the nature of the content, rather than values that describe the desired presentation of the content. [*]: https://html.spec.whatwg.org/multipage/dom.html#global-attri...

What possible benefit can come from doing this, except to appease the standard writers? Describing the presentation of content is the sole purpose of CSS. I don't see why it should matter to anyone except the author herself what names are chosen for the presentation rules.

Re: Microformats Wiki

#40

Earlier quoted context omitted.

The HTML Standard disagrees: > […] authors are encouraged to use values that describe the nature of the content, rather than values that describe the desired presentation of the content. [*]: https://html.spec.whatwg.org/multipage/dom.html#global-attri...

What possible benefit can come from doing this, except to appease the standard writers? Describing the presentation of content is the sole purpose of CSS. I don't see why it should matter to anyone except the author herself what names are chosen for the presentation rules.

Describing the presentation of content is the sole purpose of CSS.

But describing the presentation of content isn't the sole purpose of the `class` attribute. Having meaningful domain-related names included in the class makes UI testing a lot easier.

Post reply on HN