mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(docs-infra): keep inline code in links as an atomic inline box
Inline code inside a link renders as a chip with its own background. Text decoration propagates from the anchor and cannot be cancelled by a descendant, so with the chip laid out as a regular inline box the link underline is drawn straight across it. Lay the chip out as an atomic inline box, which the propagated decoration is not drawn across. This applies to the link rule only; code outside of links keeps `display: inline` for wrapping in multiline paragraphs, and the link rule already sets `white-space: nowrap`.
This commit is contained in:
@@ -87,6 +87,7 @@ $code-font-size: 0.875rem;
|
||||
width: 100%;
|
||||
|
||||
a:not(.docs-anchor) > & {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
padding: 0 0.3rem;
|
||||
white-space: nowrap;
|
||||
|
||||
Reference in New Issue
Block a user