Commit Graph

116 Commits

Author SHA1 Message Date
Antoine du Hamel
7cbcc4fc43
tools: fix CJS/ESM toggle on small screens
PR-URL: https://github.com/nodejs/node/pull/43506
Co-authored-by: Moshe Atlow <moshe@atlow.co.il>
Fixes: https://github.com/nodejs/node/issues/43468
Reviewed-By: LiviaMedeiros <livia@cirno.name>
2022-06-27 18:31:44 +02:00
Antoine du Hamel
528fef2285
doc: improve fragment (:target) anchors behavior on HTML version
This commit aims to improve the UX when navigating the docs using links
to subsections. Previously the browser would scroll down to the section
body, skipping the section heading. Using `scroll-margin-top` CSS
property, we can fix this behavior (at least on some browsers).

Links to other versions are now updated with the current targeted hash
to improve the UX when navigating from docs of one release line to
another.

I've also removed syntax not parsable by older browsers (arrow functions
and array destructuring) since the diff is pretty small and should
improve UX on those browsers.

PR-URL: https://github.com/nodejs/node/pull/42739
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-04-17 15:51:42 +01:00
Paolo Insogna
0f79a27462
doc: make header smaller and dropdown click-driven when JS is on
PR-URL: https://github.com/nodejs/node/pull/42165
Fixes: https://github.com/nodejs/node/issues/42286
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-03-22 21:31:56 +00:00
Paolo Insogna
9be1dcff34
doc,tools: improve navigability of API docs
PR-URL: https://github.com/nodejs/node/pull/41404
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-02-24 12:00:42 +01:00
Rich Trott
86fba23b1f
doc: emphasize security warning in vm module doc
Refs: https://github.com/nodejs/node/issues/40718

PR-URL: https://github.com/nodejs/node/pull/41916
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-02-12 17:09:13 +00:00
Aaron Xie
afda922349
doc: improve scrollbar appearance in dark mode
PR-URL: https://github.com/nodejs/node/pull/41890
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-02-11 12:58:18 +01:00
mscdex
bde184e8ab
doc: replace text with paths in toggle SVGs
Fixes: https://github.com/nodejs/node/issues/41878

PR-URL: https://github.com/nodejs/node/pull/41885
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-02-10 20:00:24 +00:00
Evan Lucas
c89d519528 doc: make version picker usable on mobile
This makes the version picker usable on mobile devices.
Previously, the version picker was difficult to select from. This
change makes the #gtoc > ul > li elements have a display
of `block` instead of `inline`.

PR-URL: https://github.com/nodejs/node/pull/39958
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
2021-09-22 22:08:33 +00:00
Bradley Farias
6bfe5a6796 doc: fix CJS-ESM selector in Safari
Safari needs a vendor prefix on the appearance of the checkbox.

PR-URL: https://github.com/nodejs/node/pull/40135
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-09-17 20:25:25 +02:00
Rich Trott
26632c96a6 doc: fix color contrast issue in light mode
There is a color contrast issue with links in light mode on the API
highlight background. This only appears in modules.md. This change fixes
it without introducing other contrast issues in either light or dark
mode. Previously, the color contrast for some text on modules.html was
failing WCAG AA in light mode.

PR-URL: https://github.com/nodejs/node/pull/39660
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
2021-08-06 17:30:15 +00:00
Rich Trott
21cda8ef92 doc: remove GitHub mark
Judging from https://github.com/logos, we are misusing the GitHub mark.
That page indicates to not change the color (we change it from black to
green). Less clear, it says  "Use the Mark in social buttons to link to
your GitHub profile or project" which isn't exactly what we're doing but
also isn't not what we're doing?

This might be an indication of my eyesight getting worse as I get older,
but I think the size that we display the mark at by default makes it not
entirely recognizable as the GitHub mark. Lastly, there's the
philosophical issue of whether we should display a commercial entity's
mark on our web pages in this particular instance. (For me, the answer
is "maybe".)

All told, I think we can remove it without damaging usability on the
website, so let's do it.

PR-URL: https://github.com/nodejs/node/pull/39251
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-07-07 20:42:23 -07:00
Rich Trott
68548fd661 doc: fix color contrast for anchor marks in dark mode
Currently, in its dark mode, our website background color is #090C15 and
our anchor marks are #707070 for a contrast ratio of 3.94 to 1, falling
short of the WCAG AA 4.5 to 1. This changes the mark color in dark mode
only to #7A7A7A for a color contrast of 4.55 to 1.

PR-URL: https://github.com/nodejs/node/pull/39168
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-07-04 19:57:42 -07:00
Rich Trott
dcea251435 doc: normalize CSS variable names and indentation
PR-URL: https://github.com/nodejs/node/pull/39199
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2021-07-03 10:27:14 -07:00
Rich Trott
6a7db9aad1 doc: apply logical ordering to CSS variables
The CSS variables are not in any particular logical order as far as I
can tell, with certain items that would seem to go together not grouped.
This puts them in alphabetical order.

PR-URL: https://github.com/nodejs/node/pull/39169
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
2021-06-29 19:43:12 -07: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
Antoine du Hamel
1bead013b9 doc: add distinctive color for code elements inside links
PR-URL: https://github.com/nodejs/node/pull/37950
Reviewed-By: Pooja D P <Pooja.D.P@ibm.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-04-02 11:22:52 +02:00
Antoine du Hamel
e8b1ea4ee2
tools,doc: add "legacy" badge in the TOC
PR-URL: https://github.com/nodejs/node/pull/37949
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-04-01 12:31:25 -07:00
Antoine du Hamel
1f80f6bffc doc: fix JS flavor selection
PR-URL: https://github.com/nodejs/node/pull/37791
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-03-20 19:19:04 +01:00
James M Snell
d3417bbafb
doc: apply style for legacy status
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/37784
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
2021-03-19 12:38:45 -07:00
Antoine du Hamel
2e1e74e9f8 tools,doc: add support for several flavors of JS code snippets
Enable code example using both modern ESM syntax and legacy CJS syntax.
It adds a toggle on the web interface to let users switch from one
JavaScript flavor to the other.

PR-URL: https://github.com/nodejs/node/pull/37162
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-03-06 16:13:57 +01:00
Antoine du Hamel
0177d4cc20 doc: optimize HTML rendering
Defer rendering sections of docs until they are displayed on
the user's screen.

PR-URL: https://github.com/nodejs/node/pull/37301
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-02-15 16:14:15 +01:00
Antoine du Hamel
b750f74b67 doc: fix color contrast on <kbd> elements
PR-URL: https://github.com/nodejs/node/pull/37185
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-02-02 14:43:20 +01:00
Zijian Liu
2bb42bf156 tools,doc: list the stability status of each API
Fixes: https://github.com/nodejs/node/issues/23723

PR-URL: https://github.com/nodejs/node/pull/36223
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-01-20 01:23:45 +01:00
Mattia Pontonio
2ba8728b9f doc: wrap TOC in a <details> tag
PR-URL: https://github.com/nodejs/node/pull/36896
Fixes: https://github.com/nodejs/node/issues/36885
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-01-14 16:35:59 +01: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
ce84bacdc6 doc: improve kbd element rendering
* better vertical alignment with text
* slightly larger "key" size
* remove top light area (from box-shadow)

PR-URL: https://github.com/nodejs/node/pull/35497
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-10-08 04:43:42 -07:00
Rich Trott
cd226c0305 doc: adopt MDN style for kbd elements
PR-URL: https://github.com/nodejs/node/pull/35460
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-10-04 05:34:14 -07:00
Rich Trott
aa3746d0a6 doc: implement fancier rendering for keys
Minimal CSS and markup changes to implement special rendering for
`<kbd>` elements.

PR-URL: https://github.com/nodejs/node/pull/35400
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2020-10-02 03:27:05 -07:00
Rich Trott
4fdc5ace6a doc: fix left nav color contrast
I believe this is the last change to make in the docs for color contrast
accessibility per WCAG AA.

Currently, the current item in the nav is #43853d on a #333333
background for a color contrast of 2.8:1, failing WCAG AA. This swaps in
removes a confusing bottom border on the item, replacing it with
bolding to preserve the item's highlighting.

PR-URL: https://github.com/nodejs/node/pull/35141
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-09-12 09:49:23 -07:00
Rich Trott
661b770e11 doc: restore color for visited links
A previous change altered the rendering of visited links. This restores
it.

PR-URL: https://github.com/nodejs/node/pull/35108
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2020-09-10 05:33:35 -04:00
Rich Trott
bb9117ee9f doc: change stablility-2 color for accessibility
Current contrast ratio (2.51) does not pass WCAG AA. This PR increases
the contrast to 4.50, which passes WCAG AA. The color, of course, is
still green.

PR-URL: https://github.com/nodejs/node/pull/35061
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
2020-09-06 16:50:18 -07: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
Antoine du HAMEL
ec5958f38e doc: remove style for empty links
PR-URL: https://github.com/nodejs/node/pull/35034
Refs: https://github.com/nodejs/node/pull/34955
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
2020-09-05 13:56:33 -07:00
Rich Trott
f3b4846527 doc: change color contrast for accessibility
Change background color of Stability 1 banner. Previous color contrast
of 3.61:1 fails WCAG AA. New color contrast of 4.50:1 passes.

PR-URL: https://github.com/nodejs/node/pull/35047
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
2020-09-04 15:52:43 -07:00
Justice Almanzar
6f0b87d6c9
doc: remove space above version picker
PR-URL: https://github.com/nodejs/node/pull/34768
Fixes: https://github.com/nodejs/node/issues/34767
Fixes: https://github.com/nodejs/node/issues/34447
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-08-19 23:50:26 +02:00
Antoine du HAMEL
f280d2c85c doc: add padding in the sidebar column
PR-URL: https://github.com/nodejs/node/pull/34665
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2020-08-11 13:19:37 -07:00
Antoine du HAMEL
c093f6b4d1 doc: use semantically appropriate tag for lines
The HTML <hr> element represents a thematic break between
paragraph-level elements: for example, a change of scene in a story,
or a shift of topic within a section.
The HTML Content Division element (<div>) is the generic container
for flow content and does not inherently represent anything.

The <hr> tag semantically fits better the meaning of the line between
the lists.

Refs: https://html.spec.whatwg.org/multipage/grouping-content.html#the-hr-element

PR-URL: https://github.com/nodejs/node/pull/34660
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-08-11 13:18:54 -07:00
Francisco Ryan Tolmasky I
fa2e460d0c
doc,tools: syntax highlight api docs at compile-time
Prior to this commit, API docs would be highlighted after the page
loaded using `highlightjs`. This commit still uses `highlightjs`, but
runs the generation during the compilation of the documentation, making
it so no script needs to load on the client. This results in a faster
load, as well as allowing the pages to fully functional even when
JavaScript is turned off.

PR-URL: https://github.com/nodejs/node/pull/34148
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-07-16 00:22:35 +02:00
Rodion Abdurakhimov
d853145277 doc: fix source link margin to sub-header mark
Prior to this commit, [src] link overlapped sharped (#) sub-header link

PR-URL: https://github.com/nodejs/node/pull/33664
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-07-03 13:35:17 -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
Alhadis
f14229e704 doc: eliminate dead space in API section's sidebar
This commit improves overall usability on desktop by removing the "dead"
(non-interactive) regions between links in the API section's navigation.
No visible changes have been made; this enhancement is purely tactile in
nature.

PR-URL: https://github.com/nodejs/node/pull/33469
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-05-23 17:37:47 +02:00
David Gilbertson
7baadb30bb
doc: prevent tables from shrinking page
Tables on some pages (e.g. https://nodejs.org/api/crypto.html) are
quite wide because of long content (e.g. URLs) that don't break.
With this change, cell padding is smaller on small screens, and the
table content is allowed to break.

PR-URL: https://github.com/nodejs/node/pull/31859
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-11 16:59:16 +01:00
XhmikosR
70c32a6d19
doc: remove redundant properties from headers
PR-URL: https://github.com/nodejs/node/pull/31492
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-01-28 15:34:17 +00:00
Rich Trott
97ac661302 doc: enable visual code indication in headers
This enables the grey background for inline code in headers.

Refs: https://github.com/nodejs/node/pull/31460#issuecomment-577154740

PR-URL: https://github.com/nodejs/node/pull/31493
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-01-26 08:08:17 -08:00
Rich Trott
d32a71542e doc: fix code display in header glitch
Fixes: https://github.com/nodejs/node/issues/31451

PR-URL: https://github.com/nodejs/node/pull/31460
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-01-24 04:51:54 -08:00
Rich Trott
fdec6bd744 doc: allow <code> in header elements
Allow use of <code> in header elements without styling side effects. We
can add styling later if desired. The goal here is to allow code to be
set off in markdown without needing to escape characters and do lint
exceptions for terms. This is probably a win in terms of accessibility
too although it would be moreso if we had some visual differentiation
for <code> inside of headers. As mentioned above, that can always be
added at a later time.

PR-URL: https://github.com/nodejs/node/pull/31086
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-12-26 21:31:52 -08:00
XhmikosR
cdf8f708cf doc: implement minor CSS improvements
* split selectors to one per line
* remove units from 0
* use double colon pseudo selectors consistently
* use `background-color` instead of the `background` shorthand since
  only the color is supposed to change
* remove leading zeros from numbers
* remove redundant values from shorthands
* use lowercase hex for colors
* use numeric values for `font-weight`

PR-URL: https://github.com/nodejs/node/pull/29669
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2019-10-03 20:04:43 -07:00
Roman Reiss
6447be6203
doc: adjust TOC margins
PR-URL: https://github.com/nodejs/node/pull/28075
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-06-07 11:22:16 +02:00