#microformats2 wild examples list growing quickly, will your site be the next? microformats.org/wiki/microformats2#Examples_in_the_wild
#microformats2 wild examples list growing quickly, will your site be the next? microformats.org/wiki/microformats2#Examples_in_the_wild
I’m thinking the time might have come to write a wrapper around #php DOMDocument which actually makes it usable. Thoughts:
querySelector
and querySelectorAll
are implemented for both the document and individual elements via Symfony XPath → CSS converter and relative XPath queriesinnerText
, innerHTML
for consistencyRSS enthusiasts are HTML enthusiasts who haven’t met #microformats 2 yet. microformats.org/wiki/microformats2
@benwerd loving your work on idno! Just had a look at the source, great that you’re using #microformats 2, I have some suggestions/corrections:
.h-entry
is better off where you’ve got .idno-entry
so then the author .h-card
can be scoped into the entry.p-author
to the .h-card
for each .h-entry
to explicitly declare authorship.h-as-*
on the same element as .h-entry .idno-entry
.u-url
where you currently have .dt-published
, move .dt-published
to the time
elementThanks to Aaron Parecki you can see how a page is parsed here, or use my php-mf2 demo sandbox for experimentation by hand.
@thatemil I’ve always considered style guides/pattern libraries to be unit tests for HTML+CSS, and you could automate them with JS if they get too unwieldy.
thatEmil i have heard html is important for that web thing
#TIL that you can put a relative URL in <base>
(via Tantek Çelik)
If you want to generate real PDFs from HTML (i.e. with page breaks and real text, not just vast screenshots inside a PDF) then wkpdf is the way to go. Super fast, installs easily, great output.
Laura Kalbag my current pet peeve is a h1, then a h2 directly below it which is not a header, just a paragraph the author wanted to make look bigger (or a subheader, like bootstrap does with the downright weird h1 -> small). I saw it once a while ago, now I’m seeing it everywhere :/
Really Google? em
to embolden search terms in results listings? #html
Cross-browser selection UI injection flow:
mouseup
on body
window.getSelection()
s.isCollapsed === false
, returns.getRangeAt(0)
r.surroundContents(e)
e.innerHTML
and e.textContent
now return useful values, and e’s coordinates can be used to inject UI into the pageTo resolve: what element should e be? Or more accurately, what display property should it have? Possibly inline-block
(inline mucks up if selection is across block elements, block mucks up selections within text nodes)
r.surroundContent
, namely that it does not handle partial element selections. See MDNs explanation and solution.
aral oh so you're suggesting it'd be a Boolean attr? That I could get behind – easy to polyfill too.
aral I disagree, "continue" is confusing compared to start. Start = start from a number, continue = what? Continue from a number? So the list should start from that number plus one? Or continue from another ol (perhaps by using an id reference)?
Rolled out usage of the menu
element on #taproot. I’m looking forward to more browser support for HTML context menus, that will really open up the possibilities for cross-browser extensions
To all exeter_web people who saw my #microformats talk last night: I documented my usage of µf on my own site, hopefully it’s a useful real–world reference if you’re interested in using µf2 yourselves :)
@idiot loving “He was
:).content
, but was he .happy
?”
Forget HTML5. I’m working in HTML+ from now on!
I have to say I am very impressed with @twitter’s tweet embedding HTML. Progressive enhancement + graceful degradation at it’s best.
This is a fantastic HTML5 game — very clever gameplay: http://www.currantcat.com/convergence/