authorgravatar for kappaloris@gmail.comLoris Cro <kappaloris@gmail.com> 2023-09-03 17:11:54+02:00
committergravatar for kappaloris@gmail.comLoris Cro <kappaloris@gmail.com> 2023-09-03 17:12:52+02:00
logc0da41582bb04db318c9698a1a9ea51247610b36
treec0cd8716ff1968b9361cf775aa65741c2eb6f32d
parentc3a8f1fe9268b2b24ae49a2d3490210a3a221dac

autodoc: better light mode colors

fix #15799

2 files changed, 14 insertions(+), 6 deletions(-)

lib/docs/index.html+9-3
......@@ -818,7 +818,8 @@
818818 pre {
819819 --zig-keyword: #333;
820820 --zig-builtin: #0086b3;
821 --zig-identifier: 'black';
821 --zig-identifier: black;
822 --zig-decl-identifier: #0086b3;
822823 --zig-string-literal: #d14;
823824 --zig-type: #458;
824825 --zig-fn: #900;
......@@ -828,13 +829,13 @@
828829 pre {
829830 --zig-keyword: #eee;
830831 --zig-builtin: #ff894c;
831 --zig-identifier: 'purple';
832 --zig-identifier: #bbbbbb;
833 --zig-decl-identifier: lightblue;
832834 --zig-string-literal: #2e5;
833835 --zig-type: #68f;
834836 --zig-fn: #e33;
835837 }
836838 }
837
838839
839840 .zig_keyword_addrspace,
840841 .zig_keyword_align,
......@@ -914,6 +915,11 @@
914915 color: var(--zig-identifier);
915916 font-weight: bold;
916917 }
918
919 .zig_decl_identifier {
920 color: var(--zig-decl-identifier);
921 font-weight: bold;
922 }
917923
918924 .zig_number_literal,
919925 .zig_special {
lib/docs/main.js+5-3
......@@ -1269,12 +1269,14 @@ Happy writing!
12691269 result = `<span class="zig_special">${src}</span>`;
12701270 } else if (t.tag == Tag.identifier && t.fnDecl) {
12711271 result = `<span class="zig_fn">${src}</span>`;
1272 } else if (t.tag == Tag.identifier && t.isDecl) {
1273 result = `<span class="zig_decl_identifier">${src}</span>`;
12721274 } else {
12731275 result = `<span class="zig_${t.tag}">${src}</span>`;
12741276 }
12751277
12761278 if (t.link) {
1277 result = `<a href="${t.link}">` + result + "</a>";
1279 result = `<a class="zighref="${t.link}">` + result + "</a>";
12781280 }
12791281
12801282 return result;
......@@ -1316,9 +1318,9 @@ Happy writing!
13161318 const name = getDecl(expr.declRef).name;
13171319 const link = declLinkOrSrcLink(expr.declRef);
13181320 if (link) {
1319 yield { src: name, tag: Tag.identifier, link };
1321 yield { src: name, tag: Tag.identifier, isDecl: true, link };
13201322 } else {
1321 yield { src: name, tag: Tag.identifier };
1323 yield { src: name, tag: Tag.identifier, isDecl: true };
13221324 }
13231325 return;
13241326 }