Files
json/docs/mkdocs/docs/css/custom.css
T
Niels Lohmann 52b72b5684 Improve documentation: byte layouts, release pages, See also, dark-mode images (#5906)
- Make the iterator range illustrations legible in dark mode (prefers-color-scheme
  rules inside the SVGs).
- Add a "Byte layout" section with a color-coded byte table to each binary format
  page (BJData, BON8, BSON, CBOR, MessagePack, UBJSON), and highlight the smallest
  size per file in the comparison table.
- Add "See also" sections to the overview pages that lacked one.
- Split the release notes into one page per release, grouped by minor version on
  the overview page, with an "API changes" section per release generated from the
  API pages' version histories (hooks/api_changes.py).
- Fact-check the release notes and version histories against the release tags and
  correct wrong or misleading entries (e.g., json_serializer 2.1.0, merge_patch
  3.1.0, items, count, operator[], to_bjdata, std::string_view key support).

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2026-10-24 17:57:44 +02:00

50 lines
1.3 KiB
CSS

/* enable ligatures in code and preformatted blocks */
.md-typeset code, .md-typeset pre {
font-variant-ligatures: common-ligatures;
}
/* badge after version numbers newer than the latest release (hooks/unreleased_versions.py) */
.md-typeset .unreleased-version {
display: inline-block;
padding: 0 .5em;
border: .05rem solid var(--md-accent-fg-color);
border-radius: 1em;
background-color: var(--md-accent-fg-color--transparent);
color: var(--md-typeset-color);
font-size: .7em;
font-weight: 700;
line-height: 1.6;
vertical-align: .1em;
white-space: nowrap;
cursor: help;
}
/* byte layout tables of the binary formats */
.md-typeset .byte-layout td code {
white-space: pre-wrap;
}
.md-typeset .bl {
display: inline-block;
padding: 0 .25em;
border-radius: .2em;
font-family: var(--md-code-font-family);
font-size: .85em;
white-space: nowrap;
}
.md-typeset .bl-t {
background-color: rgba(66, 133, 244, .25);
box-shadow: inset 0 -.12em 0 rgba(66, 133, 244, .8);
}
.md-typeset .bl-l {
background-color: rgba(251, 140, 0, .25);
box-shadow: inset 0 -.12em 0 rgba(251, 140, 0, .8);
}
.md-typeset .bl-d {
background-color: rgba(67, 160, 71, .25);
box-shadow: inset 0 -.12em 0 rgba(67, 160, 71, .8);
}