From f85a178a4997878d3739b2833e2d1e3ef03d98b5 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Tue, 9 Mar 2021 14:15:46 +0200 Subject: [PATCH] fix(docs-infra): fix `` styling in the "Cheat sheet" guide (#41051) Since #40944, `` elements have a distinctive background to make them stand out from regular text. However, this styling is not desirable in certain cells of the "Cheat sheet" guide's tables, which exclusively contain code. This commit updates the `` styling to remove the distinctive background in those "Cheat sheet" cells. Before #40944: ![cheatsheet code before PR 40944][1] Since #40944: ![cheatsheet code since PR 40944][2] After this commit: ![cheatsheet code after][3] [1]: https://user-images.githubusercontent.com/8604205/109383633-4f215200-78f0-11eb-95e2-2a2c4fb3a31f.png [2]: https://user-images.githubusercontent.com/8604205/109383634-50527f00-78f0-11eb-8c48-ff5f96918c4d.png [3]: https://user-images.githubusercontent.com/8604205/109383635-50eb1580-78f0-11eb-9cf2-98851692ddd9.png PR Close #41051 --- aio/src/styles/2-modules/_code.scss | 10 ++++++++++ aio/src/styles/2-modules/_table.scss | 5 ----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/aio/src/styles/2-modules/_code.scss b/aio/src/styles/2-modules/_code.scss index c58d48ec1d..643e09fc49 100644 --- a/aio/src/styles/2-modules/_code.scss +++ b/aio/src/styles/2-modules/_code.scss @@ -176,6 +176,16 @@ aio-code { padding: 4px; } + #cheatsheet { + td:first-of-type, + th { + code { + background-color: inherit; + padding: 0; + } + } + } + .code-anchor { cursor: pointer; text-decoration: none; diff --git a/aio/src/styles/2-modules/_table.scss b/aio/src/styles/2-modules/_table.scss index 24b6feb965..ecea8f0a92 100644 --- a/aio/src/styles/2-modules/_table.scss +++ b/aio/src/styles/2-modules/_table.scss @@ -94,11 +94,6 @@ table { display: block; position: relative; max-width: 100%; - - code { - padding: 0; - background-color: inherit; - } } th {