mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Monaco improvements (#15333)
- Create theme at runtime which follows the CSS variables of the site - Disable a few opinionated Monaco defaults like minimap and word highlights - Move styles to separate file Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
		
							
								
								
									
										32
									
								
								web_src/less/features/codeeditor.less
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								web_src/less/features/codeeditor.less
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,32 @@
 | 
			
		||||
.monaco-editor-container {
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  min-height: 200px;
 | 
			
		||||
  height: 90vh;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.edit.githook .monaco-editor-container {
 | 
			
		||||
  border: 1px solid var(--color-secondary);
 | 
			
		||||
  height: 70vh;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* overwrite conflicting styles from fomantic */
 | 
			
		||||
.monaco-editor-container .inputarea {
 | 
			
		||||
  min-height: 0 !important;
 | 
			
		||||
  margin: 0 !important;
 | 
			
		||||
  padding: 0 !important;
 | 
			
		||||
  resize: none !important;
 | 
			
		||||
  border: none !important;
 | 
			
		||||
  color: transparent !important;
 | 
			
		||||
  background-color: transparent !important;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* these seem unthemeable */
 | 
			
		||||
.monaco-scrollable-element > .scrollbar > .slider {
 | 
			
		||||
  background: var(--color-primary) !important;
 | 
			
		||||
}
 | 
			
		||||
.monaco-scrollable-element > .scrollbar > .slider:hover {
 | 
			
		||||
  background: var(--color-primary-dark-1) !important;
 | 
			
		||||
}
 | 
			
		||||
.monaco-scrollable-element > .scrollbar > .slider:active {
 | 
			
		||||
  background: var(--color-primary-dark-2) !important;
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user