Skip to content

st.logo makes printing look bad #10165

@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 printing an app that uses st.logo (e.g. our mega tester app), the logo is on the left side of the page and creates a wide left padding on all pages, even beyond the first one:

CleanShot 2025-01-11 at 20 31 36

And when opening the sidebar, the logo shows up twice:

CleanShot 2025-01-11 at 20 32 50

Reproducible Code Example

import streamlit as st

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

Steps To Reproduce

Run this app, then click on "Print" in the app menu.

Expected Behavior

If the sidebar is closed, the logo should show up on the top left of the first page. There should be no padding on the left side.

If the sidebar is open, the logo should show up only on top of the sidebar.

Current Behavior

See screenshots above.

Is this a regression?

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

Debug info

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

Additional Information

No response

Metadata

Metadata

Assignees

Labels

feature:st.logoRelated to `st.logo` commandpriority:P2Medium-high priority - fix within one monthstatus: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