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
This commit is contained in:
George Kalpakas 2021-02-05 12:49:12 +02:00 committed by Alex Rickabaugh
parent 60f6e177b8
commit ae1a00760d
2 changed files with 10 additions and 10 deletions

View File

@ -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;
}
}

View File

@ -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. */