Jump to content

Template:Buckets/styles.css

From Wikibooks, open books for an open world
.bucket-branch {
    display: grid;
    grid-template-columns: 1fr 9fr;
    gap: 0.1rem;
    padding: 0;
    
    background-color: inherit; 
    vertical-align: middle;
    
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui;
}

.bucket-leaf {
    background: #fff;
    padding: 0.5rem;
    
    display: flex;
    align-items: center;
    
    border-radius: 8px;  
    border: 1px solid #ddd;  
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);  
    margin-top: 0.2rem; 
}

/* Odd children in the dom tree are labels */
.bucket-branch > div.bucket-leaf:nth-child(odd) {
    font-weight: bold;
    padding: 0.5rem;
    background: #bbb;
	justify-content: center;
	
	background-color: rgb(209, 139, 71); 
    color: #fff; 
    border-radius: 8px;
}

.bucket-branch > div.bucket-leaf:nth-child(odd):hover {
	filter: brightness(1.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 700px) {
	/* On narrow screens, display vertically rather than horizontally */
    .bucket-branch, .bucket-leaf {
    	grid-template-columns: 1fr;
    }
    
    /* Alters colours of labels when switched to column mode wrt depth in tree*/
    .bucket-branch .bucket-branch > .bucket-leaf:nth-child(odd) {
		filter: brightness(1.1) saturate(0.8);
    }
	.bucket-branch .bucket-branch .bucket-branch > .bucket-leaf:nth-child(odd) {
		filter: brightness(1.3) saturate(0.6);
	}
}