From e2aa7652e5270e2a0c825ee2f0dde8e307a3b959 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Tue, 20 Jul 2021 12:36:26 +0300 Subject: [PATCH] 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 --- aio/src/styles/2-modules/cli-pages/_cli-pages.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/src/styles/2-modules/cli-pages/_cli-pages.scss b/aio/src/styles/2-modules/cli-pages/_cli-pages.scss index 03de07b761..56530f47bf 100644 --- a/aio/src/styles/2-modules/cli-pages/_cli-pages.scss +++ b/aio/src/styles/2-modules/cli-pages/_cli-pages.scss @@ -1,7 +1,7 @@ .cli-name { font-weight: bold; - .kwd { color: initial } /* override code format */ + .kwd { color: inherit; } /* override code format */ } .cli-option-syntax {