PaperModX/assets/css/common/post-single.css

657 lines
12 KiB
CSS
Raw Normal View History

.page-header,
2020-07-21 09:50:35 +01:00
.post-header {
2022-04-21 10:32:20 +01:00
margin: 32px 0;
2020-07-21 09:50:35 +01:00
}
.post-title {
font-size: 40px;
2022-04-21 10:32:20 +01:00
margin: var(--content-gap) 0;
2020-07-21 09:50:35 +01:00
}
.post-description {
2022-04-21 10:32:20 +01:00
margin: var(--content-gap) 0;
color: var(--secondary);
opacity: .8;
padding-left: .5em;
border-left: 3px solid var(--tertiary);
}
.post-meta,
.breadcrumbs {
font-size: 15px;
}
.breadcrumbs {
display: flex;
flex-wrap: wrap;
}
.breadcrumbs a {
font-size: 16px;
}
2020-07-21 09:50:35 +01:00
.post-content {
font-size: 17px;
color: var(--content);
2020-07-21 09:50:35 +01:00
}
.post-content h4,
.post-content h5,
.post-content h6 {
margin: 24px 0 16px;
2020-07-21 09:50:35 +01:00
}
.post-content h3 {
margin: 32px 0 24px;
}
2020-07-21 09:50:35 +01:00
.post-content h1 {
margin: 40px auto 32px;
font-size: 40px;
2020-07-21 09:50:35 +01:00
}
.post-content h2 {
margin: 40px auto 32px;
font-size: 32px;
2020-07-21 09:50:35 +01:00
}
.post-content h3 {
font-size: 24px;
2020-07-21 09:50:35 +01:00
}
.post-content h4 {
2022-05-04 17:45:15 +01:00
font-size: 20px;
2020-07-21 09:50:35 +01:00
}
.post-content h5 {
font-size: 14px;
2020-07-21 09:50:35 +01:00
}
.post-content h6 {
font-size: 12px;
2020-07-21 09:50:35 +01:00
}
2022-04-10 13:38:20 +01:00
.post-content a {
font-weight: 500;
color: var(--primary);
box-shadow: var(--link-underline-shadow);
2022-04-21 16:26:08 +01:00
transition: var(--link-transition);
}
.post-content a:hover {
color: var(--link-hover-color);
box-shadow: var(--link-hover-underline-shadow);
}
.post-content a.anchor:hover {
color: var(--primary);
box-shadow: 0 2px 0 var(--secondary);
2020-07-21 09:50:35 +01:00
}
.post-content a code {
margin: auto 0;
2020-07-21 09:50:35 +01:00
border-radius: 0;
box-shadow: 0 -1px 0 var(--primary) inset;
2020-07-21 09:50:35 +01:00
}
.post-content a:hover code {
box-shadow: 0 -1px 0 var(--link-hover-underline-color) inset, 0 1px 0 var(--link-hover-underline-color);
}
h1 .anchor,
h2 .anchor,
h3 .anchor,
h4 .anchor,
h5 .anchor,
h6 .anchor {
box-shadow: none;
user-select: none;
font-size: .8em;
position: relative;
top: -2px;
}
h1:hover .anchor,
h2:hover .anchor,
h3:hover .anchor,
h4:hover .anchor,
h5:hover .anchor,
h6:hover .anchor {
color: var(--secondary);
margin-inline-start: 8px;
font-weight: 500;
display: inline-flex;
}
2020-07-21 09:50:35 +01:00
.post-content del {
text-decoration: none;
background: linear-gradient(to right, var(--primary) 100%, transparent 0) 0 50%/1px 1px repeat-x;
2020-07-21 09:50:35 +01:00
}
.post-content dl,
2020-07-21 09:50:35 +01:00
.post-content ol,
.post-content p,
.post-content figure,
.post-content ul {
margin-bottom: var(--content-gap);
2020-07-21 09:50:35 +01:00
}
.post-content ol,
.post-content ul {
padding-inline-start: 20px;
2020-07-21 09:50:35 +01:00
}
2022-05-08 11:29:17 +01:00
.post-content li > ol,
.post-content li > ul {
margin-bottom: 0;
}
2020-07-21 09:50:35 +01:00
.post-content li {
2022-06-02 05:03:10 +01:00
margin-top: 10px;
2020-07-21 09:50:35 +01:00
}
.post-content li p {
2022-06-02 05:03:10 +01:00
margin-bottom: .5em;
2020-07-21 09:50:35 +01:00
}
.post-content dl {
display: flex;
flex-wrap: wrap;
margin: 0;
2020-07-21 09:50:35 +01:00
}
.post-content dt {
width: 25%;
font-weight: 700;
2020-07-21 09:50:35 +01:00
}
.post-content dd {
width: 75%;
margin-inline-start: 0;
padding-inline-start: 10px;
2020-07-21 09:50:35 +01:00
}
2021-06-11 09:04:55 +01:00
.post-content dd ~ dd,
.post-content dt ~ dt {
margin-top: 10px;
2020-07-21 09:50:35 +01:00
}
.post-content table {
margin-bottom: 32px;
2020-07-21 09:50:35 +01:00
}
.post-content table th,
.post-content table:not(.highlighttable, .highlight table, .gist .highlight) td {
2020-07-21 09:50:35 +01:00
min-width: 80px;
padding: 12px 8px;
line-height: 1.5;
border-bottom: 1px solid var(--border);
2020-07-21 09:50:35 +01:00
}
.post-content table th {
font-size: 14px;
text-align: start;
2020-07-21 09:50:35 +01:00
}
.post-content table:not(.highlighttable) td code:only-child {
margin: auto 0;
2020-07-21 09:50:35 +01:00
}
.post-content .highlight table {
border-radius: var(--radius);
}
.post-content .highlight:not(table) {
margin: var(--content-gap) auto;
border-radius: var(--radius);
2020-07-21 09:50:35 +01:00
}
2021-06-11 09:04:55 +01:00
.post-content li > .highlight {
margin-inline-end: 0;
}
2020-07-21 09:50:35 +01:00
.post-content ul pre {
margin-inline-start: calc(var(--gap) * -2);
2020-07-21 09:50:35 +01:00
}
.post-content .highlight pre {
margin: 0;
2020-07-21 09:50:35 +01:00
}
.post-content .highlighttable {
table-layout: fixed;
2020-07-21 09:50:35 +01:00
}
.post-content .highlighttable td:first-child {
width: 40px;
2020-07-21 09:50:35 +01:00
}
.post-content .highlighttable td .linenodiv {
padding-inline-end: 0 !important;
2020-07-21 09:50:35 +01:00
}
.post-content .highlighttable td .highlight,
.post-content .highlighttable td .linenodiv pre {
margin-bottom: 0;
2020-07-21 09:50:35 +01:00
}
.post-content .highlighttable td .highlight pre code::-webkit-scrollbar {
display: none;
2020-07-21 09:50:35 +01:00
}
/* code block */
.post-content .chroma {
border-radius: var(--radius);
}
/* TODO refactor this shit */
2020-07-21 09:50:35 +01:00
.post-content code {
/* inline code */
background-color: var(--code-bg);
margin: 0 3px;
padding: 4px 5px;
border-radius: 3px;
font-size: .95em;
2022-05-04 17:45:08 +01:00
}
2020-07-21 09:50:35 +01:00
.post-content pre code {
/* reset inline code */
2020-07-21 09:50:35 +01:00
display: block;
margin: auto 0;
padding: 15px;
2021-03-19 13:21:20 +00:00
overflow-x: auto;
border-radius: var(--radius);
2021-03-19 13:21:20 +00:00
word-break: break-all;
2020-07-21 09:50:35 +01:00
}
.post-content .chroma code {
background-color: inherit;
}
2020-07-21 09:50:35 +01:00
.post-content blockquote {
margin: 20px 0;
padding: 0 14px;
border-inline-start: 3px solid var(--primary);
2020-07-21 09:50:35 +01:00
}
2022-05-15 16:39:53 +01:00
.post-content sup {
line-height: 1;
}
.post-content sup a {
box-shadow: none;
font-family: Helvetica, Arial, sans-serif;
color: var(--link-hover-color);
}
.post-content sup a:hover {
box-shadow: none;
text-decoration: underline;
}
.post-content sup a:before {
content: "[";
}
.post-content sup a:after {
content: "]";
}
.post-content sup:target {
background-color: var(--link-background-color);
}
2022-05-15 16:39:53 +01:00
2020-07-21 09:50:35 +01:00
.post-content hr {
margin: 30px 0;
2020-09-16 10:59:50 +01:00
height: 2px;
2022-04-21 10:32:20 +01:00
background: var(--tertiary-bg);
2020-07-21 09:50:35 +01:00
border-top: 0;
border-bottom: 0;
2020-07-21 09:50:35 +01:00
}
.post-content iframe {
max-width: 100%;
2020-07-21 09:50:35 +01:00
}
.post-content img {
border-radius: 4px;
2022-05-05 09:49:21 +01:00
margin: 1rem auto;
}
2021-06-11 09:04:55 +01:00
.post-content img[src*="#center"] {
2021-07-03 09:59:36 +01:00
margin: 1rem auto;
}
2022-04-21 16:26:08 +01:00
.post-content video {
width: 100%;
}
.post-content figure.align-center {
2021-03-19 13:21:20 +00:00
text-align: center;
}
2021-06-11 09:04:55 +01:00
.post-content figure > figcaption {
color: var(--primary);
font-size: 16px;
font-weight: bold;
margin: 8px 0 16px;
}
2021-06-11 09:04:55 +01:00
.post-content figure > figcaption > p {
2021-03-19 13:21:20 +00:00
color: var(--secondary);
font-size: 14px;
font-weight: normal;
}
.toc {
2021-01-23 17:43:47 +00:00
margin: 0 2px 40px 2px;
border: 1px solid var(--border);
2021-01-23 17:43:47 +00:00
background: var(--code-bg);
border-radius: var(--radius);
2022-04-13 11:12:08 +01:00
padding: 0.4em 0;
}
2022-05-05 10:17:06 +01:00
.toc.side {
font-size: .8em;
}
@media screen and (min-width: 1350px) {
.toc.side {
position: fixed;
2022-04-13 11:12:08 +01:00
top: 118px;
2022-04-09 18:18:40 +01:00
z-index: 1;
max-height: calc(100% - 150px);
overflow: auto;
}
.toc.side::-webkit-scrollbar-thumb {
border: 5px solid var(--code-bg);
}
2022-04-13 11:12:08 +01:00
.toc.side.left {
left: 15px;
2022-04-13 11:12:08 +01:00
width: 250px;
}
.toc.side.right {
right: 15px;
width: 265px;
}
}
.toc details summary {
cursor: pointer;
2022-04-13 11:12:08 +01:00
margin-inline-start: 15px;
}
.toc .details {
display: inline;
font-weight: 500;
}
2021-01-23 18:08:51 +00:00
.toc .inner {
2022-04-13 11:12:08 +01:00
padding: 10px 15px 5px 35px;
2020-11-12 05:39:23 +00:00
}
.toc ul {
margin: 0;
padding: 0;
}
.toc li ul {
2022-04-13 11:12:08 +01:00
margin-inline-start: 20px;
}
2022-05-05 10:17:06 +01:00
.toc li a {
line-height: 1.5em;
padding: 3px 5px;
2022-05-05 10:17:06 +01:00
border-radius: 5px;
display: block;
}
2022-04-09 18:18:40 +01:00
.toc li a.active {
2022-05-05 10:17:06 +01:00
background-color: var(--link-background-color);
2022-04-10 13:38:20 +01:00
}
2022-05-05 10:17:06 +01:00
.toc li a:hover {
2022-04-09 18:18:40 +01:00
text-decoration: underline;
}
.toc summary:focus {
outline: 0;
}
2020-07-21 09:50:35 +01:00
.post-footer {
2022-04-21 18:09:19 +01:00
margin-top: calc(var(--content-gap) * 1.5);
2022-09-07 06:47:52 +01:00
padding-bottom: calc(var(--content-gap) * 2);
border-bottom: 1px solid var(--tertiary);
}
.share-buttons {
2022-04-21 18:09:19 +01:00
margin: var(--content-gap) 0;
2020-10-28 04:05:21 +00:00
padding-inline-start: var(--radius);
display: flex;
2021-01-23 17:48:33 +00:00
justify-content: center;
overflow-x: auto;
}
.share-buttons a {
}
.share-buttons a:not(:last-of-type) {
margin-inline-end: 12px;
}
.share-buttons a svg {
height: 30px;
width: 30px;
fill: currentColor;
2021-06-11 09:04:55 +01:00
transition: transform 0.1s;
2020-08-21 16:54:24 +01:00
}
.share-buttons svg:active {
2021-06-11 09:04:55 +01:00
transform: scale(0.96);
}
2021-01-26 05:22:30 +00:00
.post-content :not(table) ::-webkit-scrollbar-thumb {
border: 2px solid var(--code-bg);
background: rgb(113, 113, 117);
}
2021-01-26 05:22:30 +00:00
.post-content :not(table) ::-webkit-scrollbar-thumb:hover {
background: rgb(163, 163, 165);
}
2021-01-26 05:22:30 +00:00
.gist table::-webkit-scrollbar-thumb {
border: 2px solid rgb(255, 255, 255);
background: rgb(173, 173, 173);
}
2021-01-26 05:22:30 +00:00
.gist table::-webkit-scrollbar-thumb:hover {
background: rgb(112, 112, 112);
}
2021-01-26 05:22:30 +00:00
.post-content table::-webkit-scrollbar-thumb {
border-width: 2px;
}
.paginav {
2022-09-07 06:47:52 +01:00
margin-top: var(--content-gap);
display: flex;
line-height: 30px;
border-radius: var(--radius);
}
2022-04-21 18:09:19 +01:00
.paginav svg {
width: 1em;
height: 1em;
display: inline-block;
vertical-align: -0.125em;
}
.paginav .title {
letter-spacing: 1px;
text-transform: uppercase;
font-size: small;
color: var(--secondary);
}
.paginav .prev,
.paginav .next {
width: 50%;
}
2022-04-22 08:00:00 +01:00
.paginav a span {
transition: var(--link-transition);
}
2022-04-21 18:09:19 +01:00
.paginav a:hover span:not(.title) {
box-shadow: 0 1px 0;
}
.paginav .next {
margin-inline-start: auto;
text-align: right;
}
[dir="rtl"] .paginav .next {
text-align: left;
}
2022-04-21 16:26:08 +01:00
.full-width {
left: 50%;
margin-left: -50vw;
margin-right: -50vw;
max-width: 100vw;
position: relative;
right: 50%;
width: 100vw;
2022-04-21 17:38:37 +01:00
}
.comments-divider {
margin: calc(var(--content-gap) * 1) 0;
height: 1px;
background-color: var(--secondary);
}
2022-04-21 17:51:29 +01:00
2022-05-05 09:23:55 +01:00
.social-links {
margin: calc(var(--content-gap) * 2) 0;
}
/* shortcode */
.social-quote {
padding: 1em;
}
.post-content .social-quote {
margin-bottom: var(--content-gap);
}
.social-quote.tweet {
2022-05-05 09:23:55 +01:00
background-color: var(--code-bg);
border-left: 3px solid var(--twitter-color);
2022-04-21 17:51:29 +01:00
}
.social-quote.tweet svg {
color: var(--twitter-color);
}
.social-quote .title {
2022-05-05 09:23:55 +01:00
margin-bottom: .5em;
font-weight: 500;
}
.social-quote .title svg {
width: 20px;
height: 20px;
vertical-align: text-bottom;
}
.social-quote .title span {
margin-inline-start: .5em;
}
2022-05-05 09:23:55 +01:00
.social-quote p > a {
margin-inline-start: .5em;
}
.social-quote blockquote {
2022-05-05 09:23:55 +01:00
font-size: .8em;
/* reset for .post-content blockquote */
margin: 0 0 0 0;
padding: 0;
border-inline-start: 0;
2022-05-05 09:23:55 +01:00
}
.social-quote blockquote a {
2022-05-05 09:23:55 +01:00
font-weight: 500;
color: var(--primary);
box-shadow: var(--link-underline-shadow);
transition: var(--link-transition);
}
.social-quote blockquote > a:hover {
2022-05-05 09:23:55 +01:00
color: var(--twitter-color);
box-shadow: 0 2px 0 var(--twitter-color);
}
/* comments */
.comments-box {
2022-04-21 18:09:19 +01:00
margin: calc(var(--content-gap) * 2) 0;
2022-04-21 17:51:29 +01:00
background-color: var(--code-bg);
border-radius: 10px;
box-shadow: var(--shadow-elevation-low);
}
2022-06-01 15:03:01 +01:00
.comments-box.telegram-widget {
padding: .8em;
}
.comments {
2022-09-07 06:47:52 +01:00
margin: var(--content-gap) 0;
2022-06-01 15:03:01 +01:00
}
.comments .title {
margin: 20px 0;
font-size: 1.5em;
}
.comments .title > span {
line-height: 1.5rem;
}
.comments .title .counter {
color: var(--link-hover-color);
font-size: 1rem;
font-weight: bold;
vertical-align: super;
}
.footnotes {
font-size: .8em;
color: var(--primary-dim);
font-weight: 400;
padding: 1em;
background-color: var(--code-bg);
}
.footnotes a {
color: var(--primary-dim);
font-weight: 400;
}
.footnotes hr {
display: none;
}
.footnotes a {
box-shadow: none;
text-decoration: underline;
}
.footnotes a:hover {
box-shadow: none;
text-decoration: underline;
}
.footnotes ol {
margin: 0;
}
.footnotes ol li {
margin: 0 0 6px 0;
}
.footnotes ol li p {
line-height: 1.5em;
margin: 0;
}
/* fix tweet-ref makes the li markers sink at the bottom */
.footnotes ol li > * {
vertical-align: top;
}
.footnotes ol li:target {
background-color: var(--link-background-color);
}
.footnotes ol:before {
content: "Footnotes";
font-size: 1.5em;
margin-left: -1em;
font-weight: 200;
}
/* shortcode */
.tweet-ref {
width: calc(100% - 2em);
display: inline-block;
}
.tweet-ref blockquote {
margin: 3px 0 0 0;
border-inline-color: var(--tertiary);
line-height: 1.5em;
}
.tweet-ref blockquote a {
text-decoration: none;
}