gencodecss

command
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: BSD-3-Clause Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command gencodecss writes internal/web/static/code.css, the stylesheet of the code blocks that internal/markdown renders: the block itself and the colour of each hl- class of the highlighted tokens. It is run by go generate (see internal/markdown/code.go) and its output is committed; a test fails when the committed file is out of date.

The colours are not written here. Each token class takes the colour of the family it belongs to, as var(--code-keyword), var(--code-string) and so on, and app.css sets those custom properties for the light and the dark theme (SPEC D57), so the theme is chosen in one place and a block follows it with no rule of its own. Chroma's token types map to a family by their kind: every Keyword* to the keyword, every String* to the string, and so on (family).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL