1+ .sidebarWithVersionDropdown {
2+ display : flex;
3+ flex-direction : column;
4+ height : 100% ;
5+ }
6+
7+ .versionDropdownContainer {
8+ padding : 1.4rem 3.2rem 1.4rem 2.4rem ;
9+ border-bottom : 1px solid var (--ifm-color-emphasis-200 );
10+ }
11+
12+ /* Style adjustments for the dropdown in sidebar context */
13+ .versionDropdownContainer : global (.navbar__item ) {
14+ display : block;
15+ padding : 0 ;
16+ }
17+
18+ /* Ensure the dropdown button looks good in the sidebar */
19+ .versionDropdownContainer : global (.navbar__link ) {
20+ display : flex;
21+ justify-content : space-between;
22+ width : 100% ;
23+ font-size : 1.7rem ;
24+ padding : 0.4rem 0 ;
25+ }
26+
27+ /* Adjust the dropdown arrow position */
28+ .versionDropdownContainer : global (.navbar__link : after ) {
29+ margin-top : 1rem ;
30+ }
31+
32+ /* Style dropdown menu */
33+ .versionDropdownContainer : global (.dropdown__menu ) {
34+ width : 100% ;
35+ max-height : 300px ;
36+ overflow-y : auto;
37+ padding : 0.5rem 0 ;
38+ }
39+
40+ /* Style individual dropdown items */
41+ .versionDropdownContainer : global (.dropdown__link ) {
42+ display : flex;
43+ align-items : center;
44+ justify-content : space-between;
45+ padding : 1.8rem 1rem ;
46+ font-size : 1.6rem ;
47+ font-weight : 500 ;
48+ color : var (--ifm-font-color-base );
49+ }
50+
51+ /* Style the active dropdown item */
52+ .versionDropdownContainer : global (.dropdown__link--active ) {
53+ background-color : var (--ifm-color-emphasis-100 );
54+ color : var (--ifm-color-primary );
55+ }
56+
57+ /* Style dropdown items on hover */
58+ .versionDropdownContainer : global (.dropdown__link : hover ) {
59+ background-color : var (--ifm-color-emphasis-200 );
60+ text-decoration : none;
61+ }
62+
63+ /* Add a small delay before closing the dropdown */
64+ .versionDropdownContainer : global (.dropdown ) {
65+ transition-delay : 0s ;
66+ }
67+
68+ .versionDropdownContainer : global (.dropdown--show ) {
69+ transition-delay : 0s ;
70+ }
71+
72+ .versionDropdownContainer : global (.dropdown--show .dropdown__menu ) {
73+ opacity : 1 ;
74+ visibility : visible;
75+ transition : opacity 0.2s ease, visibility 0.2s ease;
76+ }
77+
78+ /* Create a "safe area" between button and dropdown */
79+ .versionDropdownContainer : global (.dropdown__menu ) {
80+ margin-top : -5px ; /* Negative margin to create overlap */
81+ padding-top : 5px ; /* Add padding at the top to maintain visual spacing */
82+ }
0 commit comments