Template:Item recipe/styles.css

From Space Station 14 Wiki
Revision as of 03:13, 2 September 2024 by Aliser (talk | contribs) (layout changes #3)
/* item recipe */
.item-recipe {
	display: flex;
    flex-direction: column;

    box-sizing: border-box;
    width: 30rem;
    max-width: 100%;
    
    border: 1px solid var(--border-color);
    padding: .25rem;
    margin: .25rem 0;
}

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

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

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

/* item recipe → content */
.item-recipe-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .2rem;

    width: 100%;
}

/* item recipe → content → product  */
.item-recipe-product {
}

/* item recipe → content → method  */
.item-recipe-method {
    white-space: nowrap;
}

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

/* item recipe → content → method → supplementary text before materials  */
/* .item-recipe .recipe-supplementary-text:has(+ .item-recipe-materials) { */
    /* for the border */
    /* height: 85%; */
    /* border-right: 2px solid hsla(240,7%,24%, .5); */
    /* make the border more legible */
    /* padding-right: 0.3rem; */
/* } */

/* item recipe → content → materials  */
.item-recipe .item-recipe-materials {
    display: flex;
    gap: .15em;
}

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

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

/* item recipe → notes */
.item-recipe .item-recipe-notes {
    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;
}