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

From Space Station 14 Wiki
(layout changes)
(removed gray labels; styles for multiple products)
 
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* item recipe */
.item-recipe {
.item-recipe {
     --padding: 0.4rem;
     --padding: 0.4rem;
    --info-icon-size: 32px;


display: flex;
    display: flex;
     flex-direction: column;
     flex-direction: column;


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


.item-recipe * {
.item-recipe.item-recipe-by-research {
     box-sizing: border-box;
}
 
.item-recipe.item-recipe-by-emag {
    border: 2px dashed hsla(0, 75%, 50%, 0.5);
}
 
.item-recipe-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: var(--padding);
 
    padding: var(--padding);
 
    background-color: var(--bg-color-light-x3);
    /* SET IN MODULE */
    /*background: ;*/
}
 
.item-recipe-product-and-method-container {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
 
.item-recipe-products {
    display: inline-flex;
    flex-direction: column;
}
 
.item-recipe-product {
 
}
 
.item-recipe-method {
}
 
.item-recipe-header > .item-recipe-info-icons {
     display: flex;
    flex-direction: column;
    align-items: center;
}
}


/* item recipe, vertical layout */
.item-recipe-header > .item-recipe-info-icons:empty {
.item-recipe.item-recipe-vertical {
    display: none;
flex-direction: row;
}
}


/* item recipe, horizontal layout */
.item-recipe-header > .item-recipe-info-icons > * {
.item-recipe.item-recipe-horizontal {
    --icon-size: 32px;
flex-direction: column;
   
    width: var(--icon-size);
    height: var(--icon-size);
 
    text-align: center;
}
}


/* item recipe, materials only mode */
.item-recipe-header > .item-recipe-info-icons > .info-icon-progression-symbol {
.item-recipe.materials-only {
color: gray;
border: none;
font-size: small;
height: 0rem;
line-height: 0;
margin: 2px 0px;
}
}


/* item recipe → content */
.item-recipe-body {
.item-recipe-content {
    /* for complete time el to work */
    position: relative;
 
     display: flex;
     display: flex;
     flex-direction: row;
     flex-direction: row;
     align-items: center;
     align-items: center;
    gap: .2rem;


    width: 100%;
     padding: var(--padding);
     padding: var(--padding);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
      
      
     min-height: 6rem;
     box-shadow:  
        inset 0 3px 5px var(--bg-color),
        inset 0 -3px 5px var(--bg-color);
 
    /* ADDED IN MODULE */
    /* background:  */
}
}


/* item recipe → content → text content */
.item-recipe-materials {
.item-recipe-text-content {
     display: flex;
     /* remove p margin */
     flex-direction: column;
    margin: 0;  
     text-align: center;
}
}


/* item recipe in materials only mode, horizontal layout */
.item-recipe.materials-only.item-recipe-materials-layout-horizontal {
    width: fit-content;
}


/* item recipe → content → text content → product  */
/* item recipe in materials only mode, horizontal layout materials */
.item-recipe-product {
.item-recipe.materials-only.item-recipe-materials-layout-horizontal .item-recipe-materials {
     display: inline-block;
     flex-direction: row;
     max-width: 10rem;
     flex-wrap: wrap;  
     text-align: end;
      
    gap: 1ch;
}
}


/* item recipe → content text content → method  */
/* item recipe in materials only mode, horizontal layout materials material */
.item-recipe-method {
.item-recipe.materials-only.item-recipe-materials-layout-horizontal .item-recipe-materials > .item {
    /* needed to position the complete time element */
    position: relative;
 
    /* disable wrapping so it aligns with the complete time perfectly */
     white-space: nowrap;
     white-space: nowrap;
}
}


/* item recipe → content → text content → method → complete time  */
.item-recipe-body > .item-recipe-complete-time {
.item-recipe-method .item-recipe-complete-time {
     position: absolute;
     position: absolute;
     bottom: 0px;
     bottom: 0;
    left: 50%;
     right: 0;
    transform: translate(-50%, 100%);
 
     padding-top: 0.5em;
    color: gray;
     font-size: small;
     font-size: small;
    margin: .5rem;
}
}


 
.item-recipe-body > .item-recipe-complete-time::before {
/* item recipe → content → text content → method → complete time → icon  */
.item-recipe-method .item-recipe-complete-time::before {
     --image-size: .7em;
     --image-size: .7em;
     background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAYAAAA1BOUGAAAAAXNSR0IArs4c6QAAAGNJREFUCJl1jlsNwCAQBOeaauhDDaLQgRU8nAQUoOCSc0B/WkJpOl97mc3mhJtSSgNwd0IIwiweVLV9xJhVtS3uzh/LeBzn2SfNjNXMuty3TZjJOb8eSik1ABkLtVYAYowCcAGDkzDCq/YM/QAAAABJRU5ErkJggg==');
     background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAYAAAA1BOUGAAAAAXNSR0IArs4c6QAAAGNJREFUCJl1jlsNwCAQBOeaauhDDaLQgRU8nAQUoOCSc0B/WkJpOl97mc3mhJtSSgNwd0IIwiweVLV9xJhVtS3uzh/LeBzn2SfNjNXMuty3TZjJOb8eSik1ABkLtVYAYowCcAGDkzDCq/YM/QAAAABJRU5ErkJggg==');
Line 96: Line 145:
}
}


/* item recipe → content → text content → method → supplementary text  */
.item-recipe-notes {
.item-recipe .recipe-supplementary-text {
color: gray;
}
 
/* item recipe → content → text content → method → supplementary text (left) */
.item-recipe .recipe-supplementary-text-left {
}
 
/* item recipe → content → text content → method → supplementary text (right) */
.item-recipe .recipe-supplementary-text-right {
}
 
/* 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;
     display: flex;
     flex-direction: column;
     flex-direction: column;
Line 133: Line 152:
padding: var(--padding);
padding: var(--padding);
    background-color: var(--bg-color-light-x3);
background-color: var(--bg-color-light-x3);
     /* SET IN MODULE */
     border-top: 1px solid var(--border-color);
    /*background: ;*/
}
 
.item-recipe-notes:empty {
display: none;
}
}


.item-recipe .item-recipe-notes .item-recipe-note {
.item-recipe-notes .item-recipe-note {
font-size: smaller;
font-size: smaller;
}
/* list of recipes */
.item-recipes-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
    justify-content: center;
}
}

Latest revision as of 18:35, 15 September 2024

.item-recipe {
    --padding: 0.4rem;
    --info-icon-size: 32px;

    display: flex;
    flex-direction: column;

    width: 20rem;
    max-width: 100%;

    border: 1px solid var(--border-color-light);
    margin: .25rem 0;
}

.item-recipe.item-recipe-by-research {
}

.item-recipe.item-recipe-by-emag {
    border: 2px dashed hsla(0, 75%, 50%, 0.5);
}

.item-recipe-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: var(--padding);

    padding: var(--padding);

    background-color: var(--bg-color-light-x3);
    /* SET IN MODULE */
    /*background: ;*/
}

.item-recipe-product-and-method-container {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.item-recipe-products {
    display: inline-flex;
    flex-direction: column;
}

.item-recipe-product {

}

.item-recipe-method {
}

.item-recipe-header > .item-recipe-info-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.item-recipe-header > .item-recipe-info-icons:empty {
    display: none;
}

.item-recipe-header > .item-recipe-info-icons > * {
    --icon-size: 32px;
    
    width: var(--icon-size);
    height: var(--icon-size);

    text-align: center;
}

.item-recipe-header > .item-recipe-info-icons > .info-icon-progression-symbol {
	color: gray;
	font-size: small;
	height: 0rem;
	line-height: 0;
	margin: 2px 0px;
}

.item-recipe-body {
    /* for complete time el to work */
    position: relative;

    display: flex;
    flex-direction: row;
    align-items: center;

    padding: var(--padding);

    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    
    box-shadow: 
        inset 0 3px 5px var(--bg-color), 
        inset 0 -3px 5px var(--bg-color);

    /* ADDED IN MODULE */
    /* background:  */
}

.item-recipe-materials {
    display: flex;
    flex-direction: column;
}

/* item recipe in materials only mode, horizontal layout */
.item-recipe.materials-only.item-recipe-materials-layout-horizontal {
    width: fit-content;
}

/* item recipe in materials only mode, horizontal layout → materials */
.item-recipe.materials-only.item-recipe-materials-layout-horizontal .item-recipe-materials {
    flex-direction: row;
    flex-wrap: wrap;   
    
    gap: 1ch;
}

/* item recipe in materials only mode, horizontal layout → materials → material */
.item-recipe.materials-only.item-recipe-materials-layout-horizontal .item-recipe-materials > .item {
    white-space: nowrap;
}

.item-recipe-body > .item-recipe-complete-time {
    position: absolute;
    bottom: 0;
    right: 0;

    font-size: small;

    margin: .5rem;
}

.item-recipe-body > .item-recipe-complete-time::before {
    --image-size: .7em;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAYAAAA1BOUGAAAAAXNSR0IArs4c6QAAAGNJREFUCJl1jlsNwCAQBOeaauhDDaLQgRU8nAQUoOCSc0B/WkJpOl97mc3mhJtSSgNwd0IIwiweVLV9xJhVtS3uzh/LeBzn2SfNjNXMuty3TZjJOb8eSik1ABkLtVYAYowCcAGDkzDCq/YM/QAAAABJRU5ErkJggg==');
    width: var(--image-size);
    height: var(--image-size);
    content: '';
    background-repeat: no-repeat;
    background-size: contain;
    image-rendering: pixelated;
    display: inline-block;
    margin-right: 0.2em;
}

.item-recipe-notes {
    display: flex;
    flex-direction: column;
    gap: .4em;
    box-sizing: border-box;
	
	padding: var(--padding);
    background-color: var(--bg-color-light-x3);
    /* SET IN MODULE */
    /*background: ;*/
}

.item-recipe-notes:empty {
	display: none;
}

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


/* list of recipes */
.item-recipes-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
    justify-content: center;
}