Compare commits

..

No commits in common. "7b5fc068eef8ba28a367b50a1b6fcdcc6dc123d9" and "0ae5842740bfa64d6606464a83e8d5927761275c" have entirely different histories.

4 changed files with 133 additions and 180 deletions

View file

@ -177,7 +177,6 @@ bool next_hole(String_Buffer& buf, const char*& fstr)
A call to `next_hole` will find the literal part, visualised with `---`, and leave the `fstr` pointer past the hole `{}`, visualised with `^`. A call to `next_hole` will find the literal part, visualised with `---`, and leave the `fstr` pointer past the hole `{}`, visualised with `^`.
{.monospaced}
``` ```
Hello, {}! Hello, {}!
------- ^ ------- ^
@ -186,7 +185,6 @@ Hello, {}!
In this case, it will return `true` to signal that it stopped at a hole.\ In this case, it will return `true` to signal that it stopped at a hole.\
In case there is no hole however, and the end of the string is reached, it will return `false`. In case there is no hole however, and the end of the string is reached, it will return `false`.
{.monospaced}
``` ```
Hello, {}! Hello, {}!
-^ end of string -^ end of string
@ -197,7 +195,6 @@ Without the extra `if` clause, it would be printed into the output literally as
Therefore, when `{` is encountered directly after another `{`, we have to flush the current span, and start a new one directly after the first `{`. Underlined with `---` are the spans of characters that get written to the output. Therefore, when `{` is encountered directly after another `{`, we have to flush the current span, and start a new one directly after the first `{`. Underlined with `---` are the spans of characters that get written to the output.
{.monospaced}
``` ```
empty {{} hole empty {{} hole
------- ------ ------- ------
@ -233,6 +230,7 @@ For example, providing an implementation of:
```cpp ```cpp
void format_value(String_Buffer& buf, const char*& fstr, int value); void format_value(String_Buffer& buf, const char*& fstr, int value);
// ^^^^^^^^^
``` ```
will make it possible to write out integers in addition to strings. will make it possible to write out integers in addition to strings.

View file

@ -156,7 +156,7 @@ Compare this to grepping through an `.rs` file, which usually yields lots of unr
I pretty much never grep through Rust files to look at APIs, while I do it all the time in C++. I pretty much never grep through Rust files to look at APIs, while I do it all the time in C++.
Perhaps it's a sign that the complexity of JavaScript-heavy online HTML documentation viewers with mediocre search functionality is entirely self-inflicted.\ Perhaps it's a sign that the complexity of JavaScript-heavy online HTML documentation viewers with mediocre search functionality is entirely self-inflicted.\
(I'll give them though that rich text is pretty cool, and [Hoogle's](https://hoogle.haskell.org/) global type signature search is _wicked_ cool. Nothing that a sufficiently advanced LSP server shouldn't be capable of doing, though.) (I'll give them though that rich text is pretty cool, and Hackage's global type signature search is _wicked_ cool. Nothing that a sufficiently advanced LSP server shouldn't be capable of doing, though.)
(...and also, fuck Doxygen. I hate using Doxygen so much. But I'll leave that for another time.) (...and also, fuck Doxygen. I hate using Doxygen so much. But I'll leave that for another time.)

View file

@ -18,9 +18,7 @@ main.doc {
} }
& .doc-text { & .doc-text {
--doc-padding: 1.6rem; padding: 1.6rem;
padding: var(--doc-padding);
max-width: min(100%, var(--doc-text-width)); max-width: min(100%, var(--doc-text-width));
line-height: 1.6; line-height: 1.6;
@ -64,20 +62,6 @@ main.doc {
& ul { & ul {
list-style: "- "; list-style: "- ";
} }
& pre,
& th-literate-program {
& code {
--recursive-wght: 520;
--recursive-mono: 0.5; /* You didn't expect a proportional font being used for code, did you. */
font-size: 90%;
tab-size: 3;
}
&.monospaced code {
--recursive-mono: 1;
}
}
} }
& section.feed { & section.feed {
@ -109,27 +93,3 @@ main.doc {
} }
} }
} }
@media (max-width: 700px) {
main.doc {
& .doc-text {
& > pre,
& > th-literate-program {
/* Stretch to whole page.
This way of doing it feels a bit brittle, though.
It might be good to refactor this to CSS grid at some point. */
padding-left: var(--doc-padding);
padding-right: var(--doc-padding);
margin-left: calc(var(--doc-padding) * -1);
margin-right: calc(var(--doc-padding) * -1);
border-radius: 0;
border-left: none;
border-right: none;
& code {
tab-size: 2;
}
}
}
}
}

View file

@ -175,17 +175,12 @@ h4 {
font-size: 1.6rem; font-size: 1.6rem;
} }
code {
--recursive-mono: 0.5;
}
pre, pre,
pre code, code,
kbd, kbd,
th-literate-program { th-literate-program {
--recursive-mono: 1; --recursive-mono: 1;
--recursive-wght: 450; --recursive-wght: 450;
tab-size: 4;
} }
strong code { strong code {