From 6c251b55617e3c1c8f2f89902a9d94bd8313fd3b Mon Sep 17 00:00:00 2001 From: Andrew Gliga Date: Wed, 12 Feb 2025 10:37:00 -0800 Subject: [PATCH] feat(link): added legal link --- .changeset/tough-games-work.md | 5 + dist/global/global.css | 4 +- dist/link/link.css | 28 ++++- dist/tokens/evo-dark.css | 3 + dist/tokens/evo-light.css | 3 + src/routes/_index/component/link/+page.marko | 114 +++++++++++++++---- src/sass/global/global.scss | 4 +- src/sass/link/link.scss | 32 +++++- src/sass/link/stories/link.stories.js | 7 ++ src/tokens/evo-dark.css | 3 + src/tokens/evo-light.css | 3 + 11 files changed, 174 insertions(+), 32 deletions(-) create mode 100644 .changeset/tough-games-work.md diff --git a/.changeset/tough-games-work.md b/.changeset/tough-games-work.md new file mode 100644 index 0000000000..76506a9913 --- /dev/null +++ b/.changeset/tough-games-work.md @@ -0,0 +1,5 @@ +--- +"@ebay/skin": minor +--- + +feat(link): added legal link diff --git a/dist/global/global.css b/dist/global/global.css index a52471f037..b04cbbb85a 100644 --- a/dist/global/global.css +++ b/dist/global/global.css @@ -21,13 +21,13 @@ legend { a { color: var( --link-foreground-color-default, - var(--color-foreground-primary) + var(--color-foreground-link-primary) ); } a:visited { color: var( --link-foreground-color-visited, - var(--color-foreground-visited) + var(--color-foreground-link-visited) ); } a:hover { diff --git a/dist/link/link.css b/dist/link/link.css index 5621afe05d..0abc65e441 100644 --- a/dist/link/link.css +++ b/dist/link/link.css @@ -1,13 +1,16 @@ a.nav-link, a.standalone-link { - color: var(--nav-link-foreground-color, var(--color-foreground-primary)); + color: var( + --nav-link-foreground-color, + var(--color-foreground-link-primary) + ); text-decoration: none; } a.nav-link:visited, a.standalone-link:visited { color: var( --link-foreground-color-default, - var(--color-foreground-primary) + var(--color-foreground-link-primary) ); } a.nav-link:hover, @@ -32,7 +35,10 @@ a.standalone-link[aria-disabled="true"] { button.fake-link { background-color: initial; border: 0; - color: var(--fake-link-foreground-color, var(--color-foreground-primary)); + color: var( + --fake-link-foreground-color, + var(--color-foreground-link-primary) + ); font-family: inherit; font-size: inherit; padding: 0; @@ -51,3 +57,19 @@ button.fake-link[disabled] { var(--color-foreground-disabled) ); } + +a.legal-link, +button.legal-link { + text-decoration: underline; +} +a.legal-link, +a.legal-link:hover, +a.legal-link:visited, +button.legal-link, +button.legal-link:hover, +button.legal-link:visited { + color: var( + --legal-link-foreground-color, + var(--color-foreground-link-legal) + ); +} diff --git a/dist/tokens/evo-dark.css b/dist/tokens/evo-dark.css index fd68c0848a..7d73480a6c 100644 --- a/dist/tokens/evo-dark.css +++ b/dist/tokens/evo-dark.css @@ -32,6 +32,9 @@ --color-foreground-on-confirmation: var(--color-neutral-800); --color-foreground-on-information: var(--color-neutral-800); --color-foreground-on-strong: var(--color-neutral-800); + --color-foreground-link-visited: var(--color-pink-400); + --color-foreground-link-legal: var(--color-foreground-accent); + --color-foreground-link-primary: var(--color-foreground-primary); --color-stroke-default: var(--color-neutral-600); --color-stroke-accent: var(--color-blue-400); --color-stroke-on-accent: var(--color-neutral-800); diff --git a/dist/tokens/evo-light.css b/dist/tokens/evo-light.css index 30c143f29b..d4be51c074 100644 --- a/dist/tokens/evo-light.css +++ b/dist/tokens/evo-light.css @@ -31,6 +31,9 @@ --color-foreground-on-confirmation: var(--color-neutral-100); --color-foreground-on-information: var(--color-neutral-100); --color-foreground-on-strong: var(--color-neutral-100); + --color-foreground-link-visited: var(--color-pink-600); + --color-foreground-link-legal: var(--color-foreground-accent); + --color-foreground-link-primary: var(--color-foreground-primary); --color-stroke-default: var(--color-neutral-500); --color-stroke-accent: var(--color-blue-500); --color-stroke-on-accent: var(--color-neutral-100); diff --git a/src/routes/_index/component/link/+page.marko b/src/routes/_index/component/link/+page.marko index cdb5601288..d982d5e1b4 100644 --- a/src/routes/_index/component/link/+page.marko +++ b/src/routes/_index/component/link/+page.marko @@ -15,7 +15,7 @@

When nested amongst paragraphs of text, the anchor tag's default underline gives visual affordance that this selection of text is a${" "} hyperlink - . The color of the link alone would not be sufficient affordance in this context and therefore the underline is required and must not be removed. + ${" "}. The color of the link alone would not be sufficient affordance in this context and therefore the underline is required and must not be removed.

@@ -38,10 +38,22 @@
- -

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

+ +

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod${" "} + + tempor incididunt + + ${" "}ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation${" "} + + ullamco laboris + + ${" "}nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in${" "} + + voluptate velit esse cillum + + dolore eu fugiat nulla pariatur. +