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

216 lines
4.0 KiB
SCSS

@charset "UTF-8";
// Post Styles
main#single {
max-width: 910px;
padding: 1em 2.5em;
margin: 0 auto;
article div {
&#content {
font-weight: 400;
line-height: 1.7;
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
figure figcaption {
font-size: 0.9em;
color: $color-medium;
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;
/* stylelint-disable-next-line selector-pseudo-element-no-unknown */
&::cue {
font-family: inherit;
}
}
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 {
font-family: $system-fonts-monospace;
background: $color-super-light;
font-size: 0.9em;
page-break-inside: avoid;
}
// inline code in paragraphs (single tildes)
code {
border: 1px solid $color-light;
padding: 0.2em;
}
// code fences
div.highlight {
border: 1px solid $color-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;
}
// overrides inline code styles
div.highlight code {
border: 0;
padding: 0;
}
}
&#meta {
text-align: center;
h1 {
margin: 0.3em 0;
font-size: 2em;
line-height: 1.4;
a {
color: inherit;
}
}
div#byline {
color: $color-medium;
font-size: 0.85em;
line-height: 1.5;
letter-spacing: 0.075em;
a {
color: inherit;
}
span.dot {
margin: 0 0.1em;
font-weight: 700;
}
ul#tags {
margin-top: 0.5em;
padding: 0;
list-style: none;
li {
display: inline;
margin: 0 0.8em;
text-transform: uppercase;
letter-spacing: 0.15em;
}
}
}
}
}
}
// Responsive
@mixin responsive--single() {
main#single {
padding: 0.8em 1.5em;
article {
div#meta{
h1 {
font-size: 1.8em;
}
div#byline {
// hide "Improve Post" link on mobile
span#edit {
display: none;
}
// less space between tags
ul#tags li {
margin: 0 0.5em;
}
}
}
}
}
}