fix default callout state
This commit is contained in:
		
							parent
							
								
									fe2852ff25
								
							
						
					
					
						commit
						92ca787092
					
				
					 4 changed files with 7 additions and 10 deletions
				
			
		
							
								
								
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,4 +1,5 @@
 | 
			
		|||
.DS_Store
 | 
			
		||||
.gitignore
 | 
			
		||||
node_modules
 | 
			
		||||
public
 | 
			
		||||
.quartz-cache
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
function toggleCallout(this: HTMLElement) {
 | 
			
		||||
  const outerBlock = this.parentElement!
 | 
			
		||||
  this.classList.toggle(`is-collapsed`)
 | 
			
		||||
  const collapsed = this.classList.contains(`is-collapsed`)
 | 
			
		||||
  outerBlock.classList.toggle(`is-collapsed`)
 | 
			
		||||
  const collapsed = outerBlock.classList.contains(`is-collapsed`)
 | 
			
		||||
  const height = collapsed ? this.scrollHeight : outerBlock.scrollHeight
 | 
			
		||||
  outerBlock.style.maxHeight = height + `px`
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -71,11 +71,6 @@ a {
 | 
			
		|||
      font-size: 2rem;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // darkmode diagrams
 | 
			
		||||
    & svg {
 | 
			
		||||
      stroke: var(--dark);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    & ul:has(input[type='checkbox']) {
 | 
			
		||||
      list-style-type: none;
 | 
			
		||||
      padding-left: 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -70,6 +70,10 @@
 | 
			
		|||
	  --color: var(--secondary);
 | 
			
		||||
	  --border: var(--lightgray);
 | 
			
		||||
	}
 | 
			
		||||
  
 | 
			
		||||
  &.is-collapsed > .callout-title > .fold {
 | 
			
		||||
    transform: rotateZ(-90deg)
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -87,9 +91,6 @@
 | 
			
		|||
    cursor: pointer;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  &.is-collapsed .fold {
 | 
			
		||||
    transform: rotateZ(-90deg)
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.callout-icon {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue