Repository navigation
ExternalLink: Align appearance with Link from @wordpress/ui #77790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
5f27ea3
2ad4ef4
b28b66d
9af12c3
1b125f3
5851296
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,41 @@ | ||
| .components-external-link { | ||
| color: var(--wpds-color-fg-interactive-brand); | ||
| text-decoration: none; | ||
|
|
||
| // Match the focus ring used by `Link` in `@wordpress/ui`. | ||
| @media not ( prefers-reduced-motion ) { | ||
| transition: outline 0.1s ease-out; | ||
| } | ||
| // Outline width must be kept at 0 even with a transparent color, | ||
| // or else the outline will be visible in forced-colors mode. | ||
| outline: 0 solid transparent; | ||
| outline-offset: 1px; | ||
|
|
||
| &:visited { | ||
| color: var(--wpds-color-fg-interactive-brand); | ||
| } | ||
|
|
||
| &:hover, | ||
| &:active { | ||
| color: var(--wpds-color-fg-interactive-brand-active); | ||
| } | ||
|
|
||
| &:focus { | ||
| outline: | ||
| var(--wpds-border-width-focus) solid | ||
| var(--wpds-color-stroke-focus-brand); | ||
| } | ||
| } | ||
|
|
||
| .components-external-link__contents { | ||
| text-decoration: underline; | ||
| text-underline-offset: 0.2em; | ||
| text-decoration-thickness: 0.5px; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using sub-pixel values may create rendering glitches on low-density screens. A few ideas:
In any case, we should update
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TIL about |
||
| } | ||
|
|
||
| .components-external-link__icon { | ||
| margin-left: 0.5ch; | ||
| font-weight: 400; | ||
| display: inline-block; | ||
| margin-inline-start: var(--wpds-dimension-padding-xs); | ||
| font-weight: var(--wpds-typography-font-weight-regular); | ||
| text-decoration: none; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.