1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 14:16:20 -04:00
jarv.is/assets/sass/pages/_single.scss

194 lines
3.6 KiB
SCSS

@charset "UTF-8";
// Post Styles
main#single {
max-width: 910px;
padding: 1em 3em;
margin: 0 auto;
article div {
&#content {
font-weight: 400;
line-height: 1.8;
h1,
h2,
h3 {
margin: 0.5em 0;
font-weight: 500;
line-height: 1.5;
}
img,
figure {
height: auto;
max-width: 100%;
margin: 1em auto;
display: block;
}
// reduce margin between image and caption
figure img {
margin-bottom: 0.4em;
}
// image captions -- two different markdown hacks
img + em,
figure figcaption {
display: block;
font-size: 0.9em;
font-style: normal;
color: $color-light;
text-align: center;
}
blockquote {
border-left: 5px solid $color-links;
margin-left: 0.5em;
padding-left: 1em;
}
ul {
list-style-position: outside;
list-style-type: square;
margin-left: 1.5em;
padding-left: 0;
li {
padding-left: 0.25em;
}
}
// https://css-tricks.com/examples/hrs/
hr {
width: 90%;
margin: 1.5em auto;
border: 0;
height: 2px;
background-image: linear-gradient(to right, #ffffff, #cccccc, #ffffff);
}
video.embed {
display: block;
margin: 1em auto;
max-width: 100%;
height: auto;
border: 0;
}
div.embed.video-player {
position: relative;
padding-bottom: 56.25%;
margin: 1em auto;
height: 0;
overflow: hidden;
iframe.youtube-player {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 0;
display: inline-block;
}
}
iframe.twitter-tweet, twitter-widget {
margin: 0 auto;
display: block;
}
iframe {
border: 0;
}
// all code
div.highlight, code {
// https://markdotto.com/2018/02/07/github-system-fonts/
font-family: "SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", "Courier", monospace;
background: $color-super-duper-light;
font-size: 0.9em;
page-break-inside: avoid;
}
// inline code in paragraphs
p code {
border: 1px solid $color-super-light;
padding: 0.2em;
}
// code fences
div.highlight {
border: 1px solid $color-super-light;
border-left: 3px solid $color-links;
line-height: 1.6;
max-width: 100%;
overflow-x: scroll;
object-fit: scale-down;
font-size: 1em;
margin: 1em 0;
}
div.highlight pre {
display: block;
margin-left: 1.5em;
}
}
&#meta {
text-align: center;
h1 {
margin: 0.3em 0;
font-size: 2em;
line-height: 1.4;
a {
color: inherit;
}
}
div#byline {
color: $color-light;
font-size: 0.85em;
line-height: 1.5;
letter-spacing: 1px;
a {
color: inherit;
}
ul#tags {
margin-top: 0.5em;
padding: 0;
list-style: none;
li {
display: inline;
margin: 0 0.7em;
text-transform: uppercase;
letter-spacing: 2px;
}
}
}
}
}
}
// Responsive
@mixin responsive--single() {
main#single {
padding: 0.8em 1.2em;
article {
width: 100%;
max-width: 100%;
div#info h1 {
font-size: 1.7em;
}
}
}
}