Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

Document the tokens the starter stylesheet offers

bc95767f6f9e79c0382becabe90b31d790d6554f · Keenan Nemetz · 1d ago · parent 3e7c5e67

Document the tokens the starter stylesheet offers

The starter profile/custom.css used a plain :root selector, which loses to the more specific :root[data-theme^="everforest-"] rules in the built-in theme sheet. Show the selector that wins, group the tokens by what they change, and add dark/light blocks plus the page-level classes to reach for when a token is not enough.

Put the same reference in docs/configuration.md so the customization is documented outside the generated repository.

forge/instancerepo/seed.go +49−7

@@ -96,15 +96,57 @@ The files above are served to visitors (the private README only to signed-in
96 96 viewers), even when the repository itself is private.
97 97 `),
98 98 "profile/README.md": []byte("# " + name + "\n\nTell people what this forge is for. This file is the landing page introduction.\n"),
99 "profile/custom.css": []byte(`/* Custom styles, loaded after the built-in stylesheets.
99 "profile/custom.css": []byte(`/* Custom styles. This file is loaded after vole.css and everforest.css.
100 100 *
101 * The palette is CSS variables; override them here rather than copying rules:
102 * :root {
103 * --accent: #7fbbb3;
104 * --bg: #1e2326;
105 * }
101 * Prefer tokens over rules: a token keeps the layout, contrast, and responsive
102 * behaviour that the built-in sheets already got right.
106 103 *
107 * The layout is grid and flex, so most re-skins need only values, not selectors.
104 * Use :root[data-theme], not plain :root. Everforest sets its tokens on
105 * :root[data-theme^="everforest-"], which is more specific than :root, so a
106 * plain :root override can lose even though this file loads later.
107 */
108
109 :root[data-theme] {
110 /* Uncomment one line at a time and reload the page.
111 *
112 * --accent: #c678dd;
113 * --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
114 * --radius: 4px;
115 * --radius-lg: 6px;
116 * --page-max: 1200px;
117 * --font: ui-sans-serif, system-ui, sans-serif;
118 */
119 }
120
121 /* A value that has to differ between dark and light modes belongs in one of
122 * these blocks. They match every Everforest variant.
123 *
124 * :root[data-theme^="everforest-dark"] { --bg: #101418; }
125 * :root[data-theme^="everforest-light"] { --bg: #fffdf7; }
126 */
127
128 /* Tokens, grouped by what they change:
129 *
130 * surfaces --bg --bg-panel --bg-raised --bg-hover --bg-active
131 * --border --border-strong
132 * text --fg --fg-muted --fg-faint
133 * identity --accent --accent-fg --accent-soft
134 * status --good --good-soft --bad --bad-soft --warn --warn-soft
135 * --running --merged --merged-soft --status-fg
136 * shape --radius --radius-lg --page-max --page-gutter --search-w
137 * type --font --mono --fs --lh
138 * (--font-scale is the reader's text-size preset: leave it alone)
139 * syntax --syn-comment --syn-punctuation --syn-operator --syn-number
140 * --syn-string --syn-keyword --syn-function --syn-type
141 * --syn-variable --syn-added --syn-deleted
142 */
143
144 /* If a token cannot express the change, these page-level classes cover most
145 * re-skins. They are not a public API; an upgrade may move markup, so prefer
146 * tokens when one exists.
147 *
148 * .panel .readme .md .repo-card .repo-grid .home-grid .home-rail
149 * .repohead .tabs .chip .label .status .config-table .diff .blob
108 150 */
109 151 `),
110 152 }