Last active
August 10, 2023 10:53
-
-
Save tomkyle/6ce9cee5d944cc5127be82a606c8a20f to your computer and use it in GitHub Desktop.
Carstens Typora User CSS. Typora docs: https://support.typora.io/Add-Custom-CSS/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Carstens Custom CSS for Typora styles | |
* https://support.typora.io/Add-Custom-CSS/ | |
* | |
* Gist: https://gist.github.com/tomkyle/6ce9cee5d944cc5127be82a606c8a20f | |
*/ | |
:root { | |
--font-family: 'Fira Sans', 'Roboto', sans-serif; | |
} | |
/* -------------------------------------------- | |
* Border above h2 | |
* -------------------------------------------- | |
*/ | |
@media screen { | |
hr { | |
height: 0.75rem; | |
} | |
} | |
/* -------------------------------------------- | |
* Page breaks | |
* | |
* https://support.typora.io/Page-Breaks/ | |
* -------------------------------------------- | |
*/ | |
@media print, (overflow-block: paged) or (overflow-block: optional-paged) | |
{ | |
/* Move top-level headings to a new page on the right-hand side: */ | |
h1 | |
{ | |
page-break-before: right; /* CSS 2 */ | |
break-before: recto; /* CSS 3+, | |
also works for languages written and paginated right-to-left */ | |
} | |
/* Override the previous ruleset for the very first heading: */ | |
h1:first-of-type, | |
section > h1:first-child | |
{ | |
page-break-before: avoid; /* CSS 2 */ | |
break-before: avoid; /* CSS 3+ */ | |
} | |
/* Force second-level headings to begin in a new column or | |
possiblyon a new page if it was in the last of multiple columns otherwise: */ | |
h2 | |
{ | |
break-before: column; | |
} | |
/* Headings should not be the last paragraph on a page: */ | |
h1, h2, h3, h4, h5, h6 | |
{ | |
page-break-after: avoid; | |
} | |
/* Consecutive headings with deepening level should not be split across pages: */ | |
h1+h2, h2+h3, h3+h4, h4+h5, h5+h6 | |
{ | |
page-break-before: avoid; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment