File size: 1,266 Bytes
a7916dc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
section[data-testid='stSidebar'] {
    background-color: #111;
    min-width:unset !important;
    width: unset !important;
    flex-shrink: unset !important;
    
}

button[kind="header"] {
    background-color: transparent;
    color:rgb(180, 167, 141)
}

@media(hover){
    /* header element to be removed */
    header[data-testid="stHeader"] {
        display:none;
    }

    /* The navigation menu specs and size */
    section[data-testid='stSidebar'] > div {
        height: 100%;
        width: 95px;
        position: relative;
        z-index: 1;
        top: 0;
        left: 0;
        background-color: #111;
        overflow-x: hidden;
        transition: 0.5s ease;
        padding-top: 60px;
        white-space: nowrap;
    }

    /* The navigation menu open and close on hover and size */
    /* section[data-testid='stSidebar'] > div {
    height: 100%;
    width: 75px; /* Put some width to hover on. */
    /* } 

    /* ON HOVER */
    section[data-testid='stSidebar'] > div:hover{
    width: 300px;
    }

    /* The button on the streamlit navigation menu - hidden */
    button[kind="header"] {
        display: none;
    }
}
     
@media(max-width: 272px){
    
    section[data-testid='stSidebar'] > div {
        width:15rem;
    }
}