Skip to content

Instantly share code, notes, and snippets.

@a-kuma3
Created March 22, 2017 23:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a-kuma3/044aec5510a5c1b3ca56773562ebb92b to your computer and use it in GitHub Desktop.
Save a-kuma3/044aec5510a5c1b3ca56773562ebb92b to your computer and use it in GitHub Desktop.
レシピ用のCSS @Hatena Blog
/*
2017-02-02 for Recipe (not Rich Snippet)
2017-03-23 外部 CSS - スマホ用
*/
.recipe .ingredients > li {
position: relative;
}
.recipe .ingredients li::before {
content: "";
display: block;
width: 100%;
position: absolute;
margin: 0.5em 0;
border-top: 1px dashed silver;
}
.recipe .ingredients > li > .name {
background-color: white;
position: absolute;
padding-right: 1em;
}
.recipe .ingredients > li >.amount {
right: 0;
position: absolute;
background-color: white;
padding-left: 1em;
}
.recipe ul.ingredients {
width: 70%;
}
.recipe .instructions p {
margin: 0;
padding-left: 1em;
}
.recipe .instructions > li {
margin-top: 0.5em;
}
.recipe .instructions > li > ul {
margin-top: 0;
margin-bottom: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment