Files
recipes/src/style2.scss
T

271 lines
6.6 KiB
SCSS

.recipe {
margin: 0 auto;
max-width: 7in;
.header {
display: flex;
.image {
background-size: cover;
background-position: center;
border: 1px solid #DDD;
border-radius: 0.25in;
display: flex;
flex: 0 0 2.5in;
min-height: 2.5in;
text-align: center;
}
.about {
flex: 1 1 100%;
margin: 0 0 0 0.125in;
padding: 0 0 0 0.125in;
h1 {
font-family: sans-serif;
font-size: 24pt;
margin: 0 0 0 0;
text-align: center;
}
.timing {
color: gray;
font-style: italic;
margin: 0 0 1em 0;
text-align: center;
}
.servings {
margin: 0 0 0.125in 0;
text-align: center;
img {
height: 0.25in;
width: 0.25in;
}
img + img {
margin-left: 0.125in;
}
}
}
.icons {
align-items: center;
display: flex;
font-family: sans-serif;
font-size: 0.25in;
justify-content: center;
margin: 0.25in 0 calc(0.25in + 8px) 0;
.icon {
background-position: center;
background-size: contain;
display: inline-block;
height: 0.375in;
margin: 0 0.5em 0 0;
position: relative;
width: 0.375in;
&:first-child {
margin-left: 0;
}
&:after {
font-family: sans-serif;
font-size: 8px;
position: absolute;
bottom: -2px;
left: 50%;
text-align: center;
transform: translate(-50%, 100%);
white-space: nowrap;
}
&.overnight {
background-image: url("./images/overnight.png");
&:after {
color: #3700A3;
content: "overnight";
}
}
&.gluten-free {
background-image: url("./images/gluten-free.png");
&:after {
color: #ECB629;
content: "no gluten";
}
}
&.low-carb {
background-image: url("./images/low-carb.png");
&:after {
color: #A83533;
content: "low carb";
}
}
&.serving {
background-image: url("./images/serving.png");
&:after {
color: black;
content: "serves";
}
}
&.vegetarian {
background-image: url("./images/vegetarian.png");
&:after {
color: #0EA822;
content: "veggie";
}
}
}
}
.description {
font-style: italic;
color: gray;
}
}
.instructions {
margin: 0.25in 0 0.25in 0;
.step {
align-items: top;
display: flex;
overflow: visible;
position: relative;
& + .step {
margin-top: 0.25in;
}
h3 {
flex: 0 0 0.375in;
font-family: sans-serif;
font-size: 24pt;
margin: 0;
position: relative;
top: -0.125em;
}
.ingredients {
flex: 0 0 2.125in;
font-size: 10pt;
ul {
list-style: none;
margin: 0;
padding: 0;
li {
display: flex;
&:nth-child(even) {
background: rgba(0, 0, 0, 0.1);
}
.amount {
flex: 0 0 25%;
font-family: sans-serif;
padding: 0 1em 0.25em 0.25em;
white-space: nowrap;
}
.item {
flex: 1 1 75%;
font-family: sans-serif;
padding: 0 1em 0.25em 0;
}
}
}
}
.detail {
border-left: 1px solid silver;
flex: 1 1 100%;
font-size: 12pt;
margin: 0 0 0 0.125in;
padding: 0 0 0 0.125in;
}
}
}
.credits {
color: gray;
font-size: 10pt;
font-style: italic;
text-align: center;
a {
color: gray;
}
}
.navigation {
font-family: sans-serif;
font-size: 12pt;
font-style: italic;
margin-top: 0.75in;
text-align: center;
a, a:visited {
color: grey;
text-decoration: none;
}
a:active {
color: blue;
text-decoration: none;
}
}
}
@media (max-width: 5in) {
.recipe {
.header {
flex-direction: column;
align-items: center;
.image {
border: 0;
border-radius: 0;
width: 100%;
}
.about {
margin: 0.125in 0 0 0;
.description {
width: 90%;
}
}
}
.instructions {
.step {
align-items: center;
flex-direction: column;
h3 {
margin: 0.25in 0 0.125in 0;
}
.ingredients {
flex: 0 0 auto;
margin: 0 0 0.125in;
width: 90%;
}
.detail {
border: 0;
}
}
}
}
}
@media print {
.navigation {
display: none;
}
}
@media screen {
.recipe {
margin-top: 0.25in;
}
}