Commit Graph

8 Commits

Author SHA1 Message Date
Rich Trott
e477978dd4
doc: fix color contrast issue in light mode
Attributes are being highlighted as #f00 on a background of #f2f2f2.
That's a color contrast of 3.98:1, failing to meet the 4.5:1 requirement
of WCAG 2.1 AA. This changes the attribute color to #d00, which has a
color contrast of 5.09:1 meeting the 4.5:1 requirement.

PR-URL: https://github.com/nodejs/node/pull/56272
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
2024-12-18 16:19:08 +00:00
Aviv Keller
29884d1d5c
doc: update hljs with the latest styles
PR-URL: https://github.com/nodejs/node/pull/52911
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
2024-05-13 10:47:45 +00:00
Antoine du Hamel
fdb097c4f4 tools: upgrade highlight.js to version 11.0.1
Refs: https://github.com/highlightjs/highlight.js/blob/main/VERSION_11_UPGRADE.md

PR-URL: https://github.com/nodejs/node/pull/39032
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-06-26 15:13:35 +00:00
Qingyu Deng
67ecd05d7a
doc: change color of doctag on night mode
Fixes: https://github.com/nodejs/node/issues/38641

PR-URL: https://github.com/nodejs/node/pull/38652
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-05-14 16:04:22 -07:00
Ajay Poshak
9ff555b7a2 doc: add dark mode
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/36313
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-01-07 14:22:07 +01:00
Rich Trott
2b2208e01a doc: update syntax highlighting color for accessibility
Previous contrast with background was 3.65, failing WCAG AA. This change
brings contrast to 4.50, passing WCAG AA.

PR-URL: https://github.com/nodejs/node/pull/35063
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-09-06 11:17:24 -07:00
Derek Lewis
1dc837ed9a doc: add http highlight grammar
Prior to this commit, http request message code blocks in Markdown
files were not being highlighted correctly. This has been corrected by
adding the new grammar to the bundle, removing the CRLFs (`\r\n`) from
these code samples, adding a reminder to re-add them, and tuning the
syntax theme to support attribute highlighting.

PR-URL: https://github.com/nodejs/node/pull/33785
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-07-02 16:32:42 -07:00
Derek Lewis
dc6c93c03e doc,tools: properly syntax highlight API ref docs
Prior to this commit, all <pre> tags were being
highlighted as JavaScript. This has been corrected
to syntax highlight all languages appearing in the
API reference docs. This was accomplished by using
highlight.js instead of SHJS for the frontend lib.

* remove SHJS JavaScript code
* add highlight.js bundle
* fix script tags to reflect replacement
* migrate CSS to use highlight.js classes
* add appropriate documentation
* ensure api_assets README.md stays interal

Fixes: https://github.com/nodejs/node/issues/33363

PR-URL: https://github.com/nodejs/node/pull/33442
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
2020-05-23 18:11:11 +02:00