Thin white space on top even after hiding header

Hi everyone,

I used the st.markdown CSS hack to hide the Streamlit header, but there is still a thin white space on top. Do you know how to hide it too?

Additional context:

  • It is only noticeable when the sidebar is open.
  • Happens with Streamlit versions 1.8 and above.
  • Maybe it has something to do with the red decorator line that shows up by default, before hiding header.

Example code:

import streamlit as st

st.markdown("""
<style>
    #MainMenu, header, footer {visibility: hidden;}
</style>
""",unsafe_allow_html=True)

st.title('This is a test app')

st.sidebar.markdown('After hiding streamlit header there is still a thin white space on top, noticeable when sidebar is open.')