Skip to content

Instantly share code, notes, and snippets.

@skishida
Created February 13, 2020 12:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skishida/247d9ff5471f0d1f9a395c292e46df73 to your computer and use it in GitHub Desktop.
Save skishida/247d9ff5471f0d1f9a395c292e46df73 to your computer and use it in GitHub Desktop.
custom css for typora, theme:quartz-milky
/* フォントを変える */
:root {
--body-font: "Rounded Mplus 1c", Roboto, "Open Sans", "Helvetica Neue",
Helvetica, Arial, sans-serif;
--monospace-font: "MigMix 1M", Inconsolata, Consolas, Menlo, "Liberation Mono";
--monospace-font-size: 0.8rem;
}
/* 目次レベルを調整 */
.md-toc-h4,
.md-toc-h5,
.md-toc-h6 {
display: none;
}
/* 図周りを調整 */
figure {
text-align: center;
}
figcaption {
color: grey;
font: 0.8rem;
}
/* h2 h3 h4 h5 h6 {
break-after: avoid;
} */
/* h6 が h5 と区別つきにくいので*/
h4 {
border-left: solid #6d6d6e;
border-bottom: solid #6d6d6e;
border-left-width: thick;
border-bottom-width: thin;
padding-left: 0.2em;
}
h5 {
padding-left: 0.2em;
border-bottom: solid #6d6d6e;
border-bottom-width: thin;
}
h6 {
color: #e4e4e4;
background-color: #6d6d6e;
padding-left: 0.2em;
}
/* 印刷時の改ページ設定 */
@media print, (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;
}
}
/* @media print, (overflow-block: optional-paged){
h2 h3 h4 h5 h6 {
break-after: always;
}
} */
/* 印刷時の改ページ設定 */
@media print, (overflow-block: optional-paged) {
hr {
page-break-after: always; /* CSS 2 */
break-after: region; /* CSS 3+ */
/* minimal layout disruption: */
height: 0.1mm;
visibility: hidden;
}
}
@media print {
figure.cover {
/* text-align:center; */
/* height: 100%; */
/* position:absolute; */
top: 50%;
left: 50%;
/* margin-top:-25px; */
/* margin-left:-25px; */
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment