hn.today

Would you reconsider your Tufte CSS sidenotes? (And footnotes in general)

kyo.iroiro.party3 points0 comments
Screenshot of Would you reconsider your Tufte CSS sidenotes? (And footnotes in general)

Tufte CSS places sidenotes in the HTML paragraph that refers to them, then uses CSS to move them into the margin on wide screens and collapse them on narrow ones. The approach can look elegant and avoid sending readers to the bottom of a page, but it puts secondary, potentially block-level content inside a paragraph in a way that clashes with how browsers and assistive tools interpret document structure. Selecting text across a sidenote may unexpectedly copy the note along with the main sentence. Reader modes and text-based browsers ignore the visual positioning, so notes can run directly into surrounding words or interrupt the sentence; a screen reader may also announce controls and links in confusing sequence.

Collapsible notes bring a separate usability problem: symbols that reveal content invite clicks, even when readers would rather keep reading, and the notes disappear until opened. That interaction undercuts the goal of presenting related information nearby without disrupting the flow. The proposed alternative is to write notes as actual footnotes, preserving their semantic structure, then use CSS to position them in the margin on wide screens and display them as ordinary blocks on mobile. Notes can be placed near the paragraphs they support, with numbering and backlinks; the author’s setup generates them from Org-mode and uses CSS grids. This approach still uses CSS, but separates document meaning from visual layout and offers a more dependable fallback for reading tools and narrow screens.

Read on kyo.iroiro.party0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Web

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.