Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Top navigation makes st.logo shrink #12657

@jrieke

Description

@jrieke

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

When using st.navigation(..., position="top"), the logo shown from st.logo is smaller than when using position="sidebar".

With position="top":

Image

With position="sidebar" (or no page navigation at all; same screenshot size as above):

Image

You can also see this in the mega tester app when enabling "Top navigation" in the sidebar.

Reproducible Code Example

import streamlit as st

st.logo("https://streamlit.io/images/brand/streamlit-mark-color.png")

def page1():
    pass


def page2():
    pass


def page3():
    pass


pages = {
        "General": [
            st.Page(page1, title="Home", icon=":material/home:"),
            st.Page(page2, title="Data visualizations", icon=":material/monitoring:"),
        ],
        "Admin": [st.Page(page3, title="Settings", icon=":material/settings:")],
    }

st.navigation(
    pages,
    position="top"
)

Steps To Reproduce

No response

Expected Behavior

Logo has the same size as when navigation is shown in sidebar or no navigation is used.

Current Behavior

Logo is smaller with top nav.

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version: 1.50
  • Python version:
  • Operating System:
  • Browser:

Additional Information

No response

Metadata

Metadata

Labels

feature:st.logoRelated to `st.logo` commandpriority:P3Medium prioritystatus:confirmedBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions