<div class="recipe">
<h3>Flying monster spaghetti<small>A recipe from the heavens.</small></h3>
<div class="recipe-flex">
<div class="description">
<img src="https://c7.staticflickr.com/6/5690/22869968934_56c45d5e90_b.jpg" alt="Picture of sphagetti">
<h4>You'll need:</h4>
<ul>
<li>Mountain pasta</li>
<li>Moon tomato</li>
<li>Fountain of Youth</li>
<li>Katana</li>
<li>Asian palm civet</li>
<li>Harry Belafonte</li>
</ul>
<p>Only recently discovered, this recipe is great for pastafarians and non-pastafarians alike and is all about the quality of the ingredients and their preparation.</p>
<p>It might take a few attempts to get right, but you'll be the star of every dinner party. While relatively rare, do make sure to ask if your guests are allergic to Harry Belafonte.</p>
<p><strong>Experience level</strong>: Level 11 Pastapolentawizard of Doom</p>
</div>
<div class="plan">
<!-- our fancy step list -->
<ol class="steps">
<li data-description="Prepare pasta">
<ul>
<li>Collect semi-ripe pasta from a legendary mountain pasta tree.</li>
<li>Find the fountain of youth Heat up said fountain.</li>
<li>Cook pasta carefully for three days, until fountain of youth is depleted.</li>
</ul>
</li>
<li data-description="Prepare tomato">
<ul>
<li>Pick a tomato harvested on the <strong>third moon of the month</strong>.</li>
<li>Balance it on your head while humming the Avengers theme song for roughly <strong>20 minutes</strong>.</li>
<li>When the tomato is asleep, violently slice it with your best Katana.</li>
</ul>
</li>
<li data-description="Sauce up">
<ul>
<li>Find an <a href="https://en.wikipedia.org/wiki/Asian_palm_civet#Kopi_Luwak">Asian palm civet</a>.</li>
<li>Feed said civet your tomato dices, then wait until day after.</li>
<li>Collect defecated tomato sauce.</li>
</ul>
</li>
<li data-description="Shake shake shake">
<ul>
<li>Find Harry Belafonte.</li>
<li>Put pasta and sauce in oversized cocktail shaker.</li>
<li>Convince Harry to shake shaker for half an hour while singing <strong>Jump in the Line</strong>.</li>
</ul>
</li>
<li data-description="Moar deliciousness">
<ul>
<li>For even better taste, replace Harry Belafonte with KC and the Sunshine Band.</li>
</ul>
</li>
</ol>
<!-- end of fancy step list -->
</div>
</div>
</div>
html, body {
height: 100%;
}
body {
font-family: Roboto, Arial, sans-serif;
background: #6D6D6D;
color: #666;
font-weight: 300;
line-height: 24px;
margin: 0;
}
strong {
font-weight: 500;
}
h3 {
background: #8BC34A;
padding: 0.8em 16px;
color: #fff;
font-weight: normal;
font-size: 2em;
margin: 0;
}
h3 small {
display: block;
font-size: 16px;
margin-top: 8px;
font-style: italic;
color: #DCEDC8;
}
h4 {
font-weight: normal;
font-size: 1.2em;
margin-top: 1em;
}
img {
max-width: 100%;
}
.recipe {
margin-bottom: 1em;
background: #fff;
box-shadow: 0px 1px 6px rgba(0,0,0,0.1);
max-width: 1100px;
margin: 0 auto;
}
.recipe-flex {
display: flex;
}
.description {
flex: 1 1 50%;
padding: 2em 2em 1em 1em;
background: #f5f5f5;
}
.plan {
flex: 1 1 50%;
min-width: 300px;
display: flex;
border-left: 3px solid #E8E8E8;
}
/* Them responsive awesomeness */
@media (min-height: 900px) {
body {
display: flex;
align-items: center;
}
}
@media (max-width: 500px) {
.recipe-flex {
flex-wrap: wrap;
}
.plan {
border-left: 0;
}
.stages {
margin-left: 24px;
}
}
/* the outer list */
.steps {
margin: 2em 0 0 -3px;
padding: 0 1em 0 0;
display: flex;
flex-wrap: wrap;
list-style-type: none;
counter-reset: steps; /* alternative to built-in list style that we can style */
}
/* the steps (li) */
.steps > li {
padding: 28px 0 0 12px;
flex: 1 1 100%;
position: relative;
border-left: 3px solid;
counter-increment: steps;
}
/* this isn't needed, but I prefer some spacing at the bottom */
.steps > li:last-child {
padding-bottom: 2em;
}
/* the smallish description label next to the bubble */
.steps > li::before {
content: "Step " counter(steps) ": " attr(data-description);
position: absolute;
top: 3px;
left: 24px;
font-style: italic;
color: #777;
font-size: 12px;
}
/* the bubble with the number in it */
.steps > li::after {
position: absolute;
top: 0;
left: -16px;
background: #fff;
border-radius: 20px;
width: 24px;
height: 24px;
display: block;
text-align: center;
font-weight: 800;
line-height: 26px;
content: counter(steps);
border: 3px solid;
}
/* the inner list within a step */
.steps ul {
margin: 0;
padding: 0;
list-style-type: none;
margin-left: 12px;
padding-top: 3px;
}
.steps ul li {
position: relative;
}
.steps ul li::before {
content: "";
width: 10px;
height: 4px;
display: block;
position: absolute;
top: 10px;
left: -27px;
border-radius: 10px;
}
/* Let's color our steps */
.steps > li:nth-child(1),
.steps > li:nth-child(1)::after { border-color: #DCEDC8; }
.steps > li:nth-child(1) li::before { background-color: #DCEDC8; }
.steps > li:nth-child(2),
.steps > li:nth-child(2)::after { border-color: #C5E1A5; }
.steps > li:nth-child(2) li::before { background-color: #C5E1A5; }
.steps > li:nth-child(3),
.steps > li:nth-child(3)::after { border-color: #AED581; }
.steps > li:nth-child(3) li::before { background-color: #AED581; }
.steps > li:nth-child(4),
.steps > li:nth-child(4)::after { border-color: #9CCC65; }
.steps > li:nth-child(4) li::before { background-color: #9CCC65; }
.steps > li:nth-child(5),
.steps > li:nth-child(5)::after { border-color: #8BC34A; }
.steps > li:nth-child(5) li::before { background-color: #8BC34A; }
.steps > li:nth-child(6),
.steps > li:nth-child(6)::after { border-color: #7CB342; }
.steps > li:nth-child(6) li::before { background-color: #7CB342; }
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.