Skip to content

Top padding on sidebar when ?embed=true #6057

@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 adding the query parameter ?embed=true to an app URL, Streamlit removes the colored line at the top. This works as intended but if the app is moving the sidebar, there's now a small 2px wide white gap above the sidebar. This should not appear but the sidebar should always go to the very top.

Reproducible Code Example

import streamlit as st

st.sidebar.write("foo")

Steps To Reproduce

Run this app, then add ?embed=true to its URL.

Expected Behavior

No gap above the sidebar.

Current Behavior

See the gap at the top:

CleanShot 2023-02-02 at 23 04 04

Is this a regression?

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

Debug info

  • Streamlit version: 1.17.0
  • Python version: 3.10
  • Operating System:
  • Browser:
  • Virtual environment:

Additional Information

No response

Are you willing to submit a PR?

  • Yes, I am willing to submit a PR!

Metadata

Metadata

Labels

status: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