Potential side note / aside design #2158
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
A little prototype with some controls to experiment with a potential floating sidebar design, which @Paul-Hebert suggested in #2148.
This isn't intended to be merged, just to share a deploy preview for reference and discussion.
Screenshots
On small screens, the side does not look much different from a paragraph with a silver background:
I set its
font-size
to be one step down in our modular scale, but it felt really small to me, so I used amax
function to only do so up to a minimum of16px
. I'm open to feedback on this.I wondered if it might feel less intrusive sometimes to use
<details>
and<summary>
, so I added a control for specifying a summary:Is that too boring looking? I'm not sure.
At very wide sizes, I use some absolute positioning and a lot of
calc
to nestle the side note into the margins. I also use a radial gradient to fake an inverted rounded corner, because I thought it felt a bit disconnected from its point in the article. (I mean, it's still a lot more disconnected from the original footnote, but this way I think it's clear that it comes between two paragraphs.)Like @Paul-Hebert's site, I added a modifier to allow the aside to align the opposite way:
The
<details>
version would work the same way at large sizes:Gosh, that version is missing something. Does it need a rule between the summary and details? Should the summary be a medium weight? I'm not sure.
I'm also wondering now if the container is too confining on large screens. Maybe a border to the left or right would work? Might be worth trying and comparing.
Testing
Try it out for yourself. I've not tested it outside of Arc (Chromium).