mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-04-15 15:42:24 -06:00
I have a site whose content is written in AsciiDoc, using the [jekyll-asciidoc][] plugin. Just the Docs works great, but there are just two minor styling glitches I've noticed: The first is that Just the Docs' CSS doesn't understand the code block markup jekyll-asciidoc produces. It's not too different though, so it's very easily fixed. The second is that jekyll-asciidoc generates `div.sect(𝑛 − 1)` elements around headings of type `h𝑛`, that enclose all the heading and all the content after it until the next heading of greater or equal rank. This means that headings are _always_ first children in AsciiDoc output, which meant the wrong margins were applied to most headings. To fix this, we need to only reduce the margin of first-child headings nested directly below the .main-content element, and headings nested directly below AsciiDoc `.sect𝑛` elements that are themselves first children. With these two small changes, my site looks perfect, and the styles look exactly the same as on Just the Docs' own documentation. [jekyll-asciidoc]: https://github.com/asciidoctor/jekyll-asciidoc
64 lines
780 B
SCSS
64 lines
780 B
SCSS
//
|
|
// Typography
|
|
//
|
|
// stylelint-disable primer/selector-no-utility, primer/no-override, selector-no-type, selector-max-type, selector-max-specificity, selector-max-id
|
|
|
|
h1,
|
|
.text-alpha {
|
|
@include fs-8;
|
|
font-weight: 300;
|
|
}
|
|
|
|
h2,
|
|
.text-beta,
|
|
#toctitle {
|
|
@include fs-6;
|
|
}
|
|
|
|
h3,
|
|
.text-gamma {
|
|
@include fs-5;
|
|
}
|
|
|
|
h4,
|
|
.text-delta {
|
|
@include fs-2;
|
|
font-weight: 400;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.1em;
|
|
}
|
|
|
|
h4 code {
|
|
text-transform: none;
|
|
}
|
|
|
|
h5,
|
|
.text-epsilon {
|
|
@include fs-3;
|
|
}
|
|
|
|
h6,
|
|
.text-zeta {
|
|
@include fs-2;
|
|
}
|
|
|
|
.text-small {
|
|
@include fs-2;
|
|
}
|
|
|
|
.text-mono {
|
|
font-family: $mono-font-family !important;
|
|
}
|
|
|
|
.text-left {
|
|
text-align: left !important;
|
|
}
|
|
|
|
.text-center {
|
|
text-align: center !important;
|
|
}
|
|
|
|
.text-right {
|
|
text-align: right !important;
|
|
}
|