@@ -14,10 +14,19 @@ iframe[title="streamlit_navigation_bar.st_navbar"] {
14
14
left: 0;
15
15
}
16
16
header[data-testid = "stHeader" ] {
17
+ /* In order for the navbar to not "blink" when switching pages */
17
18
z-index : 0 ;
19
+
20
+ /* Match navbar's height, e.g. for when `margin` is `True` */
18
21
height : {{ ui .height }};
22
+
23
+ /* Match navbar's background color, e.g. for when `margin` is `True` */
19
24
background- color : {{ ui.bg_color }};
20
25
}
26
+ div[data-testid = "stAppViewBlockContainer" ] {
27
+ /* Match Streamlit's default spacing after the body */
28
+ margin-bottom : calc (5.875rem + {{ ui .height }});
29
+ }
21
30
# stDecoration {
22
31
visibility : hidden;
23
32
}
@@ -29,7 +38,10 @@ header[data-testid="stHeader"] {
29
38
{% block hide_menu %}{% endblock %}
30
39
{% endif %}
31
40
div[data-testid = "stToolbar" ] {
41
+ /* Align the button vertically to the navbar pages */
32
42
top : calc (({{ ui .height }} - 2rem) / 2);
43
+
44
+ /* Leave space to the left that is equal to the top and bottom */
33
45
right: 0.3125rem;
34
46
}
35
47
div[class = "stStatusWidget" ] {
@@ -69,7 +81,10 @@ section.main {
69
81
{% block hide_sidebar %}{% endblock %}
70
82
{% endif %}
71
83
div[data-testid = "collapsedControl" ] {
84
+ /* Align the button vertically to the navbar pages */
72
85
top : calc (({{ ui .height }} - 2rem) / 2);
86
+
87
+ /* Leave space to the right that is equal to the top and bottom */
73
88
left: 0.3125rem;
74
89
}
75
90
div[data-testid = "collapsedControl" ] path : nth-of-type (2 ) {
@@ -85,6 +100,12 @@ div[data-testid="stSidebarContent"] button[data-testid="baseButton-header"]:hove
85
100
background-color : rgba (151 , 166 , 195 , 0.25 );
86
101
}
87
102
103
+ {# style_chat_input # }
104
+ div[data-testid = "stBottom" ] {
105
+ /* Compensate for section.main being repositioned */
106
+ bottom : {{ ui .height }};
107
+ }
108
+
88
109
{# fix_shadow # }
89
110
{% if options["fix_shadow" ] %}
90
111
{% block fix_shadow %}{% endblock %}
0 commit comments