Sticky scrollable nav bar in docs

43 views
Skip to first unread message

William J. Bowman

unread,
Feb 17, 2021, 7:01:11 PM2/17/21
to Racket Users
One of my students asked about making the Racket docs navbar sticky and scrollable, to help when navigating very long docs pages. I made a quick hack and deployed it here:
https://www.students.cs.ubc.ca/~cs-411/docs/reference/sets.html

Personally I've found it very useful. Would this change make sense for the Racket docs generally? (With some polish by someone who is better at UX than me?)

To implement it, I just replaced `doc-site.css` with the following

.navsettop {
position: fixed;
z-index: 1;
background: #a7b0be;
height: auto;
}


.tocset {
position: fixed;
overflow-y: scroll;
height: 88%;
}

--
William J. Bowman

Sam Tobin-Hochstadt

unread,
Feb 18, 2021, 2:48:18 PM2/18/21
to William J. Bowman, Racket Users
This seems like it would be a nice addition. I think starting with a
PR is the right place to begin.

Sam
> --
> You received this message because you are subscribed to the Google Groups "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/YC2uQ3BJIsMJTsMP%40williamjbowman.com.

Yury Bulka

unread,
Feb 18, 2021, 6:08:01 PM2/18/21
to Sam Tobin-Hochstadt, William J. Bowman, racket...@googlegroups.com
I agree this is a useful improvement. I would consider using "position:
sticky" instead of "position: fixed" as that is generally less
"intrusive" to the layout and doesn't create a need for a second scroll
bar (the element would scroll as needed with the main scrollbar, but
still be sticky in the sense that it would keep itself within the
viewport).

--
Yury Bulka
https://mamot.fr/@setthemfree
#NotOnFacebook

Ben Greenman

unread,
Feb 18, 2021, 7:56:23 PM2/18/21
to racket...@googlegroups.com
"sticky" looks worse to me on that example page --- I have to scroll
to the bottom of all the set docs before I can read the navbar
> https://groups.google.com/d/msgid/racket-users/87zh01ht4j.fsf%40privacyrequired.com.
>

jackh...@gmail.com

unread,
Feb 19, 2021, 10:46:19 PM2/19/21
to Racket Users
This is great! Definitely send a PR for this.
Reply all
Reply to author
Forward
0 new messages