From ae1a00760d5ffc937f94c09353a4e615237f5e58 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Fri, 5 Feb 2021 12:49:12 +0200 Subject: [PATCH] refactor(docs-infra): move common `.code-anchor` styles to `_code.scss` (#40704) The `.code-anchor` class can be used anywhere where we have code examples (including API pages and docs guides). Previously, global styles for `.code-anchor` were defined in `_api-list.scss` (i.e. the styles from `_api-list.scss` were also applied to `.code-anchor` elements in other pages/components). This commit moves the `.code-anchor` styles to `_code.scss`, which contains other common code-related styles. PR Close #40704 --- aio/src/styles/2-modules/_api-list.scss | 10 ---------- aio/src/styles/2-modules/_code.scss | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/aio/src/styles/2-modules/_api-list.scss b/aio/src/styles/2-modules/_api-list.scss index 9c9d75719f..7e6c77d90f 100644 --- a/aio/src/styles/2-modules/_api-list.scss +++ b/aio/src/styles/2-modules/_api-list.scss @@ -171,13 +171,3 @@ aio-api-list { z-index: $layer-1; } } - -.code-anchor { - cursor: pointer; - text-decoration: none; - font-size: inherit; - - &:hover { - text-decoration: underline; - } -} diff --git a/aio/src/styles/2-modules/_code.scss b/aio/src/styles/2-modules/_code.scss index 3a3cad1d21..4eeb1c7eec 100644 --- a/aio/src/styles/2-modules/_code.scss +++ b/aio/src/styles/2-modules/_code.scss @@ -161,6 +161,16 @@ aio-code { font-weight: inherit; } } + + .code-anchor { + cursor: pointer; + text-decoration: none; + font-size: inherit; + + &:hover { + text-decoration: underline; + } + } } /* PRETTY PRINTING STYLES for prettify.js. */