Template:Item recipe/styles.css: Difference between revisions

From Space Station 14 Wiki
(wip)
(wip)
Line 30: Line 30:
/* item recipe → product  */
/* item recipe → product  */
.item-recipe-product {
.item-recipe-product {
grid-area: 1 / 1 / 3 / 2;
grid-area: 1 / 1 / 2 / 2;
}
}


/* item recipe → method  */
/* item recipe → method  */
.item-recipe-method {
.item-recipe-method {
grid-area: 1 / 2 / 3 / 3;
grid-area: 1 / 2 / 2 / 3;
     height: 85%;
     height: 85%;
Line 52: Line 52:
/* item recipe → materials  */
/* item recipe → materials  */
.item-recipe .item-recipe-materials {
.item-recipe .item-recipe-materials {
grid-area: 1 / 3 / 3 / 4;
grid-area: 1 / 3 / 2 / 4;
     display: flex;
     display: flex;
Line 70: Line 70:
/* item recipe → notes */
/* item recipe → notes */
.item-recipe .item-recipe-notes {
.item-recipe .item-recipe-notes {
grid-area: 2 / 1 / 3 / 3;  
grid-area: 2 / 1 / 3 / 4;  
align-self: end;
align-self: end;
Line 79: Line 79:
/* negate margin */
/* negate margin */
margin-left: -.25rem;
margin: -.25rem;
margin-bottom: -.25rem;
padding: .4rem;
padding-left: .4rem;
background-color: var(--bg-color-light-x3);
padding-bottom: .4rem;
    border-top: 1px solid var(--border-color);
}
}



Revision as of 13:14, 1 September 2024

/* item recipe */
.item-recipe {
	display: grid;
    grid-template-columns: repeat(3, max-content);
    grid-template-rows: max-content min-content;
    align-items: center;
    
    gap: .2rem;
    border: 1px solid var(--border-color);
    width: fit-content;
    padding: .25rem;
    margin: .25rem 0;
}

/* item recipe, vertical layout */
.item-recipe.item-recipe-vertical {
	flex-direction: column;
}

/* item recipe, horizontal layout */
.item-recipe.item-recipe-horizontal {
	flex-direction: row;
}

/* item recipe, materials only mode */
.item-recipe.materials-only {
	border: none;
}

/* item recipe → product  */
.item-recipe-product {
	grid-area: 1 / 1 / 2 / 2;
}

/* item recipe → method  */
.item-recipe-method {
	grid-area: 1 / 2 / 2 / 3;
	
    height: 85%;
    display: flex;
    align-items: center;
    gap: .2rem;
    border-right: 2px solid hsla(240,7%,24%, .5);
    padding-right: 0.3rem;
}

/* item recipe → method → supplementary text  */
.item-recipe .recipe-supplementary-text {
	color: gray;
}

/* item recipe → materials  */
.item-recipe .item-recipe-materials {
	grid-area: 1 / 3 / 2 / 4;
	
    display: flex;
    gap: .15em;
}

/* item recipe, vertical layout → materials */
.item-recipe.item-recipe-vertical .item-recipe-materials {
	flex-direction: row;
}

/* item recipe, horizontal layout → materials */
.item-recipe.item-recipe-horizontal .item-recipe-materials {
	flex-direction: column;
}

/* item recipe → notes */
.item-recipe .item-recipe-notes {
	grid-area: 2 / 1 / 3 / 4; 
	align-self: end;
	
    display: flex;
    flex-direction: column;
    gap: .4em;
    box-sizing: border-box;
	
	/* negate margin */
	margin: -.25rem;
	padding: .4rem;
	
	background-color: var(--bg-color-light-x3);
    border-top: 1px solid var(--border-color);
}

.item-recipe .item-recipe-notes .item-recipe-note {
	font-size: smaller;
}