generated from tpl/obsidian-sample-plugin
			Make bookshelf full width on small screens
This commit is contained in:
		
							parent
							
								
									212d3acce3
								
							
						
					
					
						commit
						7e5135d99e
					
				| 
						 | 
				
			
			@ -66,8 +66,14 @@
 | 
			
		|||
 | 
			
		||||
<style lang="scss">
 | 
			
		||||
	.shelf-code-block {
 | 
			
		||||
		container: bookshelf / inline-size;
 | 
			
		||||
 | 
			
		||||
		.controls {
 | 
			
		||||
			margin-bottom: 1rem;
 | 
			
		||||
 | 
			
		||||
			@container (width < 600px) {
 | 
			
		||||
				width: 100% !important;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		&.bookshelf-view {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -162,6 +162,16 @@
 | 
			
		|||
				max-width: 30%;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			@container (width < 600px) {
 | 
			
		||||
				flex-direction: column;
 | 
			
		||||
				align-items: center;
 | 
			
		||||
 | 
			
		||||
				img {
 | 
			
		||||
					max-height: 30rem;
 | 
			
		||||
					max-width: 100%;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			.book-info {
 | 
			
		||||
				display: flex;
 | 
			
		||||
				flex-direction: column;
 | 
			
		||||
| 
						 | 
				
			
			@ -198,18 +208,5 @@
 | 
			
		|||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		container: book-details-list / inline-size;
 | 
			
		||||
		@container book-details-list (width < 600px) {
 | 
			
		||||
			.book-details {
 | 
			
		||||
				flex-direction: column;
 | 
			
		||||
				align-items: center;
 | 
			
		||||
 | 
			
		||||
				img {
 | 
			
		||||
					max-height: 30rem;
 | 
			
		||||
					max-width: 100%;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
</style>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,7 +18,6 @@
 | 
			
		|||
	div.bookshelf {
 | 
			
		||||
		width: 80%;
 | 
			
		||||
		margin: 0 auto;
 | 
			
		||||
		min-height: 100vh;
 | 
			
		||||
		min-height: calc(bookshelf.$height + bookshelf.$shelf-width);
 | 
			
		||||
		background-image: linear-gradient(
 | 
			
		||||
			color.scale(bookshelf.$color, $lightness: -32%),
 | 
			
		||||
| 
						 | 
				
			
			@ -52,5 +51,10 @@
 | 
			
		|||
		display: flex;
 | 
			
		||||
		flex-wrap: wrap;
 | 
			
		||||
		gap: bookshelf.$shelf-width bookshelf.$book-spacing;
 | 
			
		||||
 | 
			
		||||
		container: bookshelf / inline-size;
 | 
			
		||||
		@container bookshelf (width < 600px) {
 | 
			
		||||
			width: 100%;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
</style>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue