fix(docs-infra): fix keyword color in CLI pages code blocks (#42889)

Previously, names of CLI commands that also happened to be keywords were
shown in black color in the code block demonstrating the command's
usage. This worked fine when in light mode (where the code block
background is white) but not in the recently introduced dark mode (where
the code block background is dark gray).

This commit fixes this by ensuring the `.kwd` token color is inherited
from its parent (which has an appropriate color for the current theme).
Previously, the `.kwd` token was reset to its initial value (which is
`black` regardless of the theme).

**Before:** ![CLI pages keyword before][1]
**After:** ![cli-pages-keyword after][2]

[1]: https://user-images.githubusercontent.com/8604205/126073803-af317f0c-d04f-4c3a-9a83-e92541d7dd5a.png
[2]: https://user-images.githubusercontent.com/8604205/126073806-1d57e3ed-90b1-4735-ae2a-d0a39862bb95.png

PR Close #42889
This commit is contained in:
George Kalpakas 2021-07-20 12:36:26 +03:00 committed by Alex Rickabaugh
parent 70c3461be3
commit e2aa7652e5
1 changed files with 1 additions and 1 deletions

View File

@ -1,7 +1,7 @@
.cli-name {
font-weight: bold;
.kwd { color: initial } /* override code format */
.kwd { color: inherit; } /* override code format */
}
.cli-option-syntax {