recipe-site/assets/style.css

251 lines
3.9 KiB
CSS
Raw Normal View History

2020-03-01 07:36:48 +00:00
html {
overflow-y: scroll; /* force scrollbar to appear to stop elements jumping around when the scrollbar appears naturally */
}
2020-02-29 19:01:50 +00:00
body {
2020-02-29 20:26:37 +00:00
font-family: "DejaVu Sans", "Bitstream Vera Sans", "Helvetica", "Roboto", sans-serif;
display: flex;
flex-direction: column;
min-height: 100vh;
background: #fafafa;
2020-03-01 07:36:48 +00:00
margin: 0;
2020-02-29 19:01:50 +00:00
}
2020-03-01 07:36:48 +00:00
#main {
width: 80%;
2020-03-05 09:42:10 +00:00
max-width: 1500px;
2020-02-29 20:26:37 +00:00
flex-grow: 1;
2020-03-05 09:42:10 +00:00
margin: 0 auto;
2020-02-29 20:26:37 +00:00
}
2020-03-01 07:36:48 +00:00
h1 {
margin: 0;
padding: 20px 0;
text-align: center;
background: linear-gradient(to right, turquoise, transparent 80%);
}
h1.scrolling {
position: fixed;
top: 0;
left: 0;
right: 0;
/* backdrop-filter: blur(5px); */ /* disabled because firefox (73) renders it weirdly */
}
h1.invisible {
position: relative;
visibility: hidden;
}
2020-03-01 07:36:48 +00:00
h2 {
padding-left: 10px;
background: linear-gradient(to right, turquoise 5px, transparent 5px 100%);
}
h2.no-bg {
background: none;
}
2020-03-01 07:36:48 +00:00
h1, h2, h3, h4, h5, h6 {
font-weight: 400;
2020-03-05 09:27:35 +00:00
page-break-after: avoid;
2020-03-01 07:36:48 +00:00
}
h3 {
font-size: 1.3em;
}
h4 {
font-size: 1.2em;
margin: 0.75em 0;
}
2020-03-03 14:14:16 +00:00
.stars {
font-family: 'stars';
}
2020-03-01 08:38:27 +00:00
.ingredients li.optional::before {
content: "(Optional) ";
font-style: italic;
}
2020-02-29 19:01:50 +00:00
.subrecipe {
2020-02-29 20:26:37 +00:00
background: #eee;
2020-03-01 07:36:48 +00:00
padding: 10px;
border-radius: 10px;
}
.subrecipe, p {
margin-left: 10px;
margin-right: 10px;
2020-02-29 19:01:50 +00:00
}
.subrecipe h3 {
margin: 0;
}
.subrecipe-output {
height: 0;
overflow-y: hidden;
}
.subrecipe.open .subrecipe-output {
height: min-content;
}
2020-03-01 06:47:33 +00:00
.subrecipe-heading h3 {
display: inline-block;
}
.subrecipe-toggle {
margin-left: 10px;
}
.subrecipe-toggle::after {
font-style: italic;
2020-03-01 07:36:48 +00:00
font-size: 0.75em;
vertical-align: text-top;
2020-03-01 06:47:33 +00:00
}
.subrecipe .subrecipe-toggle::after {
content: "Show";
}
.subrecipe.open .subrecipe-toggle::after {
content: "Hide";
}
2020-03-01 07:36:48 +00:00
a {
color: turquoise;
text-decoration: none;
}
a.dark {
filter: brightness(80%);
}
a:not(.recipe-listing):hover {
2020-03-01 07:36:48 +00:00
text-decoration: underline;
}
2020-02-29 19:01:50 +00:00
ul {
list-style-type: "- ";
}
ul, ol {
list-style-position: inside;
padding-left: 10px;
}
li {
padding: 1px 0;
}
2020-02-29 20:26:37 +00:00
#recipes {
display: flex;
flex-flow: row wrap;
}
.recipe-listing {
display: block;
margin: 10px;
height: min-content;
padding: 0 5px;
border-radius: 10px;
background: linear-gradient(to right, turquoise 5px, #eee 5px 100%);
max-width: 600px;
2020-03-03 11:39:43 +00:00
flex: 1 0 400px;
box-shadow: 0 0 3px #0003;
transition: 0.2s all;
}
.recipe-listing:hover {
box-shadow: 0 0 15px #0003;
}
a.recipe-listing {
color: black;
}
.recipe-listing h3 {
padding-left: 10px;
}
.method li input[type=checkbox]:checked + label {
color: grey;
text-decoration: line-through;
}
.excerpt {
color: grey;
position: relative;
margin-bottom: 0;
}
.excerpt::after {
top: 0;
left: 0;
right: 0;
bottom: 0;
content: "";
position: absolute;
font-size: 1em;
background: linear-gradient(to top, #eee 1em, transparent);
}
table {
border-collapse: collapse;
width: max-content;
min-width: 50%;
max-width: 90%;
margin: 0 auto;
background: #0001;
border-radius: 10px;
}
tr:nth-of-type(2n) {
background: #0001;
}
td {
padding: 10px;
}
td:last-of-type {
text-align: right;
}
2020-02-29 20:26:37 +00:00
footer {
text-align: center;
2020-03-01 07:36:48 +00:00
background: #333;
display: block;
width: 100%;
padding: 20px 0;
margin: 30px 0 0 0;
2020-02-29 20:26:37 +00:00
}
footer, .subtle {
color: grey;
font-style: italic;
}
2020-03-03 14:14:16 +00:00
@font-face {
font-family: 'stars';
src: url("/assets/fonts/stars.woff") format("woff"), url("/assets/fonts/stars.woff2") format("woff2");
}
2020-03-05 09:27:35 +00:00
/* print css */
@page {
size: A4;
@bottom-center {
content: counter(page) " of " counter(pages);
}
}
@media print {
body {
display: block;
}
li {
padding: 0;
}
input[type="checkbox"], footer {
display: none;
}
h1.scrolling {
position: relative;
}
h1.invisible {
display: none;
}
.subrecipe-output {
height: min-content;
}
.subrecipe, p {
margin-left: 0;
margin-right: 0;
}
.subrecipe {
border-top: thin black solid;
border-bottom: thin black solid;
border-radius: 0;
}
.subrecipe .subrecipe-toggle::after {
content: "";
}
}