mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-10-31 07:57:55 +03:00 
			
		
		
		
	Fix sidebar styling when browser window is too small
This commit is contained in:
		
							parent
							
								
									af2fdc03a6
								
							
						
					
					
						commit
						4d22a65e78
					
				|  | @ -303,3 +303,7 @@ table { | ||||||
|   border-color: white; |   border-color: white; | ||||||
|   margin-bottom: 0.6em; |   margin-bottom: 0.6em; | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | .side-nav { | ||||||
|  |   overflow-y: scroll; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | @ -198,5 +198,14 @@ | ||||||
|       $('.dropdown-menu').on('click touchstart', function(event) { |       $('.dropdown-menu').on('click touchstart', function(event) { | ||||||
|         event.stopPropagation(); |         event.stopPropagation(); | ||||||
|       }); |       }); | ||||||
|  | 
 | ||||||
|  |       // Dynamically force sidenav to no higher than browser window | ||||||
|  |       $('.side-nav').css('max-height', window.innerHeight - 125); | ||||||
|  | 
 | ||||||
|  |       $(function(){ | ||||||
|  |         $(window).resize(function(){ | ||||||
|  |           $('.side-nav').css('max-height', window.innerHeight - 125); | ||||||
|  |         }); | ||||||
|  |       }); | ||||||
|     </script> |     </script> | ||||||
| </body></html> | </body></html> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user