mirror of
				https://github.com/flynx/pWiki.git
				synced 2025-10-31 02:50:08 +00:00 
			
		
		
		
	now code is scrollable horizontally...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									73004faf9b
								
							
						
					
					
						commit
						77e9a6ba2f
					
				| @ -625,10 +625,34 @@ | |||||||
| 	} | 	} | ||||||
| 	& pre>code { | 	& pre>code { | ||||||
| 		display: block; | 		display: block; | ||||||
|  | 		width: fit-content; | ||||||
| 		padding: 0.6em 0.6em; | 		padding: 0.6em 0.6em; | ||||||
| 		padding-bottom: 0.8em; | 		padding-bottom: 0.8em; | ||||||
| 		outline: none; | 		outline: none; | ||||||
| 	} | 	} | ||||||
|  | 
 | ||||||
|  | 	/* scrollbar... */ | ||||||
|  | 	& pre { | ||||||
|  | 		overflow-x: visible; | ||||||
|  | 		overflow-y: auto; | ||||||
|  | 
 | ||||||
|  | 		scrollbar-width: thin; | ||||||
|  | 	} | ||||||
|  | 	& pre::-webkit-scrollbar { | ||||||
|  | 		--size: 0.5rem; | ||||||
|  | 
 | ||||||
|  | 		width: var(--size); | ||||||
|  | 		height: var(--size); | ||||||
|  | 
 | ||||||
|  | 		/* XXX due to a bug in chrome this does change the scrollbar curosr... */ | ||||||
|  | 		cursor: pointer; | ||||||
|  | 	} | ||||||
|  | 	& pre::-webkit-scrollbar-track { | ||||||
|  | 		background: transparent; | ||||||
|  | 	} | ||||||
|  | 	& pre::-webkit-scrollbar-thumb { | ||||||
|  | 		background: silver; | ||||||
|  | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -225,6 +225,10 @@ var quoted = { | |||||||
| 				&& elem.getAttribute('contenteditable') == 'true'){ | 				&& elem.getAttribute('contenteditable') == 'true'){ | ||||||
| 			// XXX can keydown and keyup be triggered from different elements???
 | 			// XXX can keydown and keyup be triggered from different elements???
 | ||||||
| 			this.__state = elem.innerText | 			this.__state = elem.innerText | ||||||
|  | 			// XXX move this to keyboard.js...
 | ||||||
|  | 			if(evt.key == 'Escape'){ | ||||||
|  | 				editor.focus(elem) } | ||||||
|  | 			// XXX not sure if the is needed with keyboard.js...
 | ||||||
| 			return false } }, | 			return false } }, | ||||||
| 	// defined <plugin>.__editedview__(..) handler
 | 	// defined <plugin>.__editedview__(..) handler
 | ||||||
| 	__keyup__: function(evt, editor, elem){ | 	__keyup__: function(evt, editor, elem){ | ||||||
|  | |||||||
| @ -133,6 +133,10 @@ var setup = function(){ | |||||||
|   - empty item height is a bit off... |   - empty item height is a bit off... | ||||||
|   - search? |   - search? | ||||||
|     - _...not sure if search should be internal or external yet..._ |     - _...not sure if search should be internal or external yet..._ | ||||||
|  |   - DONE add horizontal scroll to code blocks... | ||||||
|  |     - ```html | ||||||
|  |       <outline-editor session-storage="outline-text" value="initial text"></outline-editor> | ||||||
|  |       ``` | ||||||
|   - DONE trailing whitespace is ignored in `.view`... |   - DONE trailing whitespace is ignored in `.view`... | ||||||
|     collapsed:: true |     collapsed:: true | ||||||
|     - demos: |     - demos: | ||||||
| @ -248,6 +252,21 @@ var setup = function(){ | |||||||
|   - Docs |   - Docs | ||||||
|   - |   - | ||||||
| - ## Docs | - ## Docs | ||||||
|  |   - ### Use | ||||||
|  |     - Minimal | ||||||
|  |       ```html | ||||||
|  |       <outline-editor></outline-editor> | ||||||
|  |       ``` | ||||||
|  |     - Session-stored | ||||||
|  |       ```html | ||||||
|  |       <outline-editor  | ||||||
|  |           session-storage="outline-text"  | ||||||
|  |           value="initial text"></outline-editor> | ||||||
|  |       ``` | ||||||
|  |     - #### Attributes: | ||||||
|  |       - `value` | ||||||
|  |       - `session-storage` | ||||||
|  |       - `local-storage` | ||||||
|   - ### Controls |   - ### Controls | ||||||
|     - ASAP: these need updating... |     - ASAP: these need updating... | ||||||
|     - | Key        | Action                       | |     - | Key        | Action                       | | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user