Skip to content

Conversation

@sfc-gh-dmatthews
Copy link
Contributor

📚 Context

Move the version selector to the top of the page and make it sticky to it's always visible (but only on versioned pages). The appearance is more consistently designed with other elements.

🧠 Description of Changes

After:
image
image

Before:
image
image

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@sfc-gh-dmatthews
Copy link
Contributor Author

sfc-gh-dmatthews commented Dec 19, 2025

It looks like I need to tweak the exclamation mark in the warning circle. The mobile view has the wrong color and it looks like it's a little off-center. (Done.)

@sfc-gh-dmatthews sfc-gh-dmatthews requested a review from a team January 9, 2026 17:33
/* Sticky positioning - stays in place as you scroll */
position: sticky;
top: 0.5rem;
z-index: 50; /* Above header (z-30) */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have an inventory of Z-index in the website?
I think you should be careful with those numbers, and have a list of z-index in the app.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this to the global CSS. Looking at this line, I should probably convert this to Tailwind style here. I think I can convert all of these...

Comment on lines 5 to 32
/*
* ==========================================================================
* Z-INDEX REFERENCE
* ==========================================================================
* Use this scale to maintain consistent stacking order across the site.
* When adding new z-index values, update this reference.
*
* z-50 - Version selector (sticky container & dropdown menu)
* - Theme toggle tooltip
*
* z-30 - Header navigation (header.module.css)
* - Image lightbox overlay (image.module.css)
* - Chat sticky button (chatSticky.module.css)
*
* z-20 - Sidebar navigation (sideBar.module.css)
* - Image lightbox close button (image.module.css)
* - RefCard containers (refCard.module.css)
*
* z-10 - Code block elements (code.module.css, autofunction.module.css)
* - Search modal & search box (search.module.css, searchModal.css)
* - Floating nav & gradients (floatingNav.module.css, sideBar.module.css)
* - Nav icons (navChild.module.css)
* - Component slider elements (componentSlider.module.css)
*
* z-0 - Line highlights in code blocks (base layer)
* ==========================================================================
*/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can use this approach, for Z-index and for other variables.
take a look in the next PR, you can use it as an example
https://github.com/streamlit/docs/pull/1401/changes

@sfc-gh-dmatthews sfc-gh-dmatthews merged commit 68583ef into main Jan 10, 2026
4 checks passed
@sfc-gh-dmatthews sfc-gh-dmatthews deleted the feature/version-selector branch January 10, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants