Files
klammertext/sks/section/css/section.css
Andy Kopra 37b6ba1c4f Verbatim-safe typography, ^-punctuation quoting, full-range ^UUUU^, polyglot html
Typographic transforms (---, quote pairs, ~) no longer touch verbatim
text: @c/@code/@source_listing content and ^'...'^ spans show exactly the
characters written. "^" before any punctuation character quotes it in
every target (the apostrophe excepted: ^' opens a literal span), with the
new :resolve option on @@@target declaring per-target renderings. The
^UUUU^ code-point form accepts 4-6 hex digits, the full Unicode range.
The html output and transform spellings are polyglot (XML-valid), in
preparation for an EPUB target. New suites: transform_test, character_test
(engine), typography_test (SKS).

(from dev 07ce5ea86a0a)
2026-08-23 20:48:26 +02:00

133 lines
2.2 KiB
CSS

:root {
--tab: 1.5em;
--toc-bottom: .1em;
}
kt-part {
display: block;
padding-top: 1.5rem;
margin-top: 0px;
font-family: var(--sans-serif);
/* font-size: 2.03rem; */ /* ladder top: 1.125^6 ... */
}
kt-chapter {
display: block;
padding-top: 1.5rem;
margin-top: 0px;
font-family: var(--sans-serif);
/* font-size: 1.80rem; */ /* ... 1.125^5 */
}
/*
h1 {
padding-top: 1.5rem;
margin-top: 0;
}
h2, h3, h4, h5 {
padding-top: 0.25rem;
margin-bottom: .25rem;
padding-bottom: 0rem;
}
*/
/* The heading ladder: a modular scale, ratio 1.125 (a "major second"),
flattening to weight below h4 -- seven visibly distinct sizes is more
hierarchy than an eye tracks. font-size-adjust (font.css) makes these
steps family-independent, so the rem values are the whole truth. */
/*
h1 {
font-size: 1.60rem;
}
h2 {
font-size: 1.42rem;
}
h3 {
font-size: 1.27rem;
}
h4 {
font-size: 1.13rem;
}
h5, h6 {
font-size: 1rem;
font-weight: bold;
}
*/
/* Too big. How about: */
kt-part { font-size: 1.4rem; }
kt-chapter { font-size: 1.4rem; }
h1 { font-size: 1.3rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.15rem; }
h4, h5, h6 { font-size: 1.125rem; }
/* Vertical space not used to indicate hierarchical level: */
kt-part, kt-chapter, h1, h2, h3, h4, h5, h6 {
margin-top: 1.2rem;
margin-bottom: 0.0rem;
padding-top: 0;
padding-bottom: 0;
}
/* Table of contents: */
.sectiontitle {
}
.sectionnumber {
padding-right: .5rem;
}
.level {
font: .9em var(--sans-serif);
}
.level a:link, .level a:visited {
color: black;
}
.level_number {
padding-right: .5em;
}
.level1 {
margin-left: 0;
margin-bottom: var(--toc-bottom);
}
.level2 {
margin-left: calc(1 * var(--tab));
margin-bottom: var(--toc-bottom);
}
.level3 {
margin-left: calc(2 * var(--tab));
margin-bottom: var(--toc-bottom);
}
.level4 {
margin-left: calc(3 * var(--tab));
margin-bottom: var(--toc-bottom);
}
.level5 {
margin-left: calc(4 * var(--tab));
margin-bottom: var(--toc-bottom);
}
.level6 {
margin-left: calc(5 * var(--tab));
margin-bottom: var(--toc-bottom);
}