docs: document how external link icons work (#37025)

After PR #36601 which added icons to all external links. Documented how this is happening via comments in scss file. For details visit PR #36601

PR Close #37025
This commit is contained in:
Ajit Singh 2020-06-10 22:29:28 +05:30 committed by Misko Hevery
parent aba33de5f5
commit a075260751
1 changed files with 7 additions and 0 deletions

View File

@ -193,6 +193,11 @@ code {
} }
} }
// The following css rule adds an icon to external links in the docs area.
// The following `folder-*` classes are applied to the `doc-viewer`component when it is displaying docs for these areas of the documentation.
// We add the icon to all external links which are identified as absolute links (those that start with `http` or https`).
// For more info see PR #36601
.folder-api, .folder-api,
.folder-cli, .folder-cli,
.folder-docs, .folder-docs,
@ -213,6 +218,8 @@ code {
} }
} }
// The docs-viewer also contain links to GitHub (e.g. the edit this page icon) identified with `.github-links` class.
// We don't want to add the external link icon to these links, so we hide them.
.github-links a { .github-links a {
&[href^="http:"]::after, &[href^="http:"]::after,
&[href^="https:"]::after { &[href^="https:"]::after {