edwardtufte / tufte-css

Style your webpage like Edward Tufte’s handouts.
https://edwardtufte.github.io/tufte-css/
MIT License
5.98k stars 458 forks source link

Allow marginnote with paragraph or div #156

Closed fulldecent closed 4 years ago

fulldecent commented 4 years ago

Currently a marginnote only works if attributed to a specific word/sentence in a paragraph, using <span>.

This does not meet my life experience with the actual usage of margin notes.

Whereas sidenotes/endnotes/footnotes have specific reference numbers, marginnotes seem to be more general. And perhaps these general notes could be their own paragraphs.

Recommend to allow margin notes with <p class="marginnote"> and possibly also <div class="marginnote">.


And because these notes are more general, I cannot see a good experience where a reader would know to expand the note.

Here is a specific note I am incorporating in an article. (Before implementing Tufte CSS)

Note that all Solidity examples used in this article are written in a way they can be copy-pasted and compiled with Remix. Page example uses Web3 and requires MetaMask.

Currently, this is at the end of my introduction. That seems fine. But if I am to implement Tufte CSS I might add that next to my first Solidity example. I cannot see an appropriate place in the introductory sentence for my Solidity example to link to that note:

Please note that the 10,000 tokens supply test was chosen for its simplicity to demonstrate the technique. The same technique can be used on much more complex tests. <<READERS, THERE IS A RANDOM SYMBOL HERE, CLICK IT IF YOU WANT TO SEE MY NOTE ABOUT THE CODE SAMPLES IN THIS BLOG POST>>

I don't think a 🔲 icon appropriately summarizes the "READERS, THERE IS..." note above.


Related // AND scope creep.

Tufte CSS's project scope is targeting "the web". And nowadays "the web" is primarily viewed on mobile. So careful attention should be given to the experience for mobile readers. I argue that in light of the marginnote findings above, the default usage of marginnote should be to show the note without requiring an extra click on mobile. And because this is not possible when using <span>, I would prefer that <span> be disallowed.

daveliepmann commented 4 years ago

Hi, thanks for sharing your thoughts. The details of your proposal aren't entirely clear to me.

These questions are interesting. But I want to be clear that fresh answers don't belong in this project — as interesting and valuable they may be. Fundamentally, Tufte CSS is what it is: side and margin notes associated with a specific spot in the text, which appear in the margin, or behind a tap/click when there is no margin. That's not going to change, because this project is no longer a space to experiment with new approaches. From the README:

This project is maintained but not under active development. It is considered essentially feature-complete. Refactoring and new functionality are a very low priority. However, contributions are still welcome to fix bugs or add functionality.

I think you might be happiest making a fork of the project under its own name, and experimenting with your ideas there. There are plenty of other interesting answers to the design challenge of margin notes, and I'm excited to see them. But they don't all have to live in the same project.