diff --git a/sampler/src/main/java/atlantafx/sampler/page/general/TypographyPage.java b/sampler/src/main/java/atlantafx/sampler/page/general/TypographyPage.java index 3768c1a..6c84ba6 100755 --- a/sampler/src/main/java/atlantafx/sampler/page/general/TypographyPage.java +++ b/sampler/src/main/java/atlantafx/sampler/page/general/TypographyPage.java @@ -244,9 +244,14 @@ public class TypographyPage extends AbstractPage { var linkVisited = hyperlink("_Visited", true, false); linkVisited.setMnemonicParsing(true); + var linkBroken = hyperlink("_Broken", true, false); + linkBroken.setStyle("-color-link-fg-visited:-color-danger-fg;"); + linkBroken.setMnemonicParsing(true); + var box = new HBox(10, linkNormal, linkVisited, + linkBroken, hyperlink("Disabled", false, true) ); box.setAlignment(Pos.BASELINE_LEFT); diff --git a/styles/src/components/_hyperlink.scss b/styles/src/components/_hyperlink.scss index f84211d..778c8ba 100755 --- a/styles/src/components/_hyperlink.scss +++ b/styles/src/components/_hyperlink.scss @@ -2,17 +2,26 @@ @use "../settings/config"as cfg; +$color-fg: -color-accent-fg !default; +$color-fg-visited: -color-fg-default !default; +$color-fg-armed: -color-fg-default !default; + .hyperlink { + + -color-link-fg: $color-fg; + -color-link-fg-visited: $color-fg-visited; + -color-link-fg-armed: $color-fg-armed; + -fx-cursor: hand; -fx-underline: true; - -fx-text-fill: -color-accent-fg; + -fx-text-fill: -color-link-fg; &:visited { - -fx-text-fill: -color-fg-default; + -fx-text-fill: -color-link-fg-visited; } &:armed { - -fx-text-fill: -color-fg-default; + -fx-text-fill: -color-link-fg-armed; -fx-underline: false; }