File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 168168 font-size : 0.68rem ;
169169 min-width : 0 ;
170170 white-space : nowrap;
171- overflow : visible;
171+ overflow : hidden;
172+ text-overflow : ellipsis;
172173}
173174
174175.cs-tabs-inline .md-tabs__item--active .md-tabs__link ,
177178 box-shadow : inset 0 -2px 0 # ff3d6c ;
178179}
179180
181+ /* Collapse tabs when search is focused to prevent overlap */
182+ .cs-search-open .cs-header-tabs {
183+ opacity : 0 ;
184+ pointer-events : none;
185+ transform : translateY (-4px );
186+ transition : opacity 0.15s ease, transform 0.15s ease;
187+ }
188+
180189/* Footer: revert to theme defaults (remove custom padding hacks) */
181190
182191.cs-tabs-inline .md-tabs {
Original file line number Diff line number Diff line change 115115 function init ( ) {
116116 updateTabsLayout ( ) ;
117117 window . addEventListener ( "resize" , debounce ( updateTabsLayout , 150 ) ) ;
118+
119+ // Hide tabs when search is active to avoid overlaps.
120+ const searchInput = document . querySelector ( ".md-search__input" ) ;
121+ if ( searchInput ) {
122+ const onOpen = ( ) => root . classList . add ( "cs-search-open" ) ;
123+ const onClose = ( ) => root . classList . remove ( "cs-search-open" ) ;
124+ searchInput . addEventListener ( "focus" , onOpen ) ;
125+ searchInput . addEventListener ( "blur" , onClose ) ;
126+ document . addEventListener ( "keydown" , ( event ) => {
127+ if ( event . key === "Escape" ) {
128+ onClose ( ) ;
129+ }
130+ } ) ;
131+ }
118132 }
119133
120134 if ( document . readyState === "loading" ) {
You can’t perform that action at this time.
0 commit comments