+
diff --git a/styles/global.scss b/styles/global.scss
index ce49368f82..5c2116ce00 100644
--- a/styles/global.scss
+++ b/styles/global.scss
@@ -201,6 +201,23 @@ a {
}
}
+// Single source of truth for links styled as text rather than as a button.
+// The color and the underline live together here so the two can't drift apart.
+// Put .text-link on a link itself, or on any container to style every link
+// inside it. Markdown-generated content gets the treatment automatically.
+a.text-link:not(.button-link),
+.text-link a:not(.button-link),
+.rendered-markdown a:not(.button-link) {
+ color: var(--type-magenta-dark);
+ text-decoration: underline;
+ text-decoration-color: var(--type-magenta-dark);
+
+ .dark-theme & {
+ color: var(--type-magenta);
+ text-decoration-color: var(--type-magenta);
+ }
+}
+
code {
@extend .text-body-mono;
font-size: inherit;
diff --git a/styles/markdown.scss b/styles/markdown.scss
index d31606cc72..11b1641770 100644
--- a/styles/markdown.scss
+++ b/styles/markdown.scss
@@ -18,16 +18,6 @@
max-width: variables.$breakpoint-tablet;
}
- a {
- color: var(--type-magenta-dark);
- text-decoration-color: var(--type-magenta-dark);
-
- .dark-theme & {
- color: var(--type-magenta);
- text-decoration-color: var(--type-magenta);
- }
- }
-
a.button-link {
margin-top: var(--spacing-md);
min-width: 180px;
@@ -114,4 +104,4 @@ html[lang="ko"] .rendered-markdown {
line-height: 1.7;
// Prevent awkward Korean line breaks
word-break: keep-all;
-}
\ No newline at end of file
+}