link_styles: Establish variable-based generic link styles.

This commit is contained in:
Karl Stolley 2024-10-10 09:39:04 -05:00 committed by Tim Abbott
parent 78826dd981
commit 155fc9f1d7
5 changed files with 24 additions and 29 deletions

View File

@ -730,6 +730,9 @@
--color-text-settings-field-hint: hsl(0deg 0% 57%); --color-text-settings-field-hint: hsl(0deg 0% 57%);
--color-text-clear-search-button: hsl(0deg 0% 80%); --color-text-clear-search-button: hsl(0deg 0% 80%);
--color-text-clear-search-button-hover: hsl(0deg 0% 0%); --color-text-clear-search-button-hover: hsl(0deg 0% 0%);
/* These colors are from Bootstrap. */
--color-text-generic-link: #08c;
--color-text-generic-link-interactive: #005580;
/* Demo Organization colors */ /* Demo Organization colors */
--color-text-settings-demo-organization-warning: hsl(4deg 58% 33%); --color-text-settings-demo-organization-warning: hsl(4deg 58% 33%);
@ -1237,6 +1240,8 @@
--color-text-settings-field-hint: hsl(0deg 0% 52%); --color-text-settings-field-hint: hsl(0deg 0% 52%);
--color-text-clear-search-button: hsl(236deg 33% 80%); --color-text-clear-search-button: hsl(236deg 33% 80%);
--color-text-clear-search-button-hover: hsl(0deg 0% 100%); --color-text-clear-search-button-hover: hsl(0deg 0% 100%);
--color-text-generic-link: #08c;
--color-text-generic-link-interactive: hsl(200deg 79% 66%);
/* Demo Organization colors */ /* Demo Organization colors */
--color-text-settings-demo-organization-warning: hsl(3deg 73% 80%); --color-text-settings-demo-organization-warning: hsl(3deg 73% 80%);
@ -1292,6 +1297,10 @@
--color-markdown-pre-background: hsl(0deg 0% 100% / 4%); --color-markdown-pre-background: hsl(0deg 0% 100% / 4%);
--color-markdown-pre-background-mentions: hsl(0deg 0% 100% / 5%); --color-markdown-pre-background-mentions: hsl(0deg 0% 100% / 5%);
--color-markdown-pre-border-mentions: var(--color-markdown-pre-border); --color-markdown-pre-border-mentions: var(--color-markdown-pre-border);
--color-markdown-link: var(--color-text-generic-link);
--color-markdown-code-link: var(--color-markdown-link);
--color-markdown-link-hover: var(--color-text-generic-link-interactive);
--color-markdown-code-link-hover: var(--color-markdown-link-hover);
/* Icon colors */ /* Icon colors */
--color-icon-bot: hsl(180deg 5% 50% / 100%); --color-icon-bot: hsl(180deg 5% 50% / 100%);

View File

@ -13,22 +13,6 @@
@extend .placeholder; @extend .placeholder;
} }
&
a:not(
.button,
.compose_control_button,
.conversation-partners,
.user-presence-link,
.typeahead-item-link
):hover {
color: hsl(200deg 79% 66%);
text-decoration: none;
& code {
color: hsl(200deg 79% 66%);
}
}
& ul.dm-list, & ul.dm-list,
& ul.filters { & ul.filters {
.has-unmuted-mentions .unread_mention_info { .has-unmuted-mentions .unread_mention_info {

View File

@ -34,7 +34,7 @@
color: var(--color-text-message-header); color: var(--color-text-message-header);
&:hover { &:hover {
color: var(--color-text-message-header) !important; color: var(--color-text-message-header);
text-decoration: none; text-decoration: none;
} }
} }

View File

@ -68,12 +68,23 @@ blockquote p {
font-weight: normal; font-weight: normal;
} }
/* These colors are typically overridden,
but referencing them as variables prevents
specificity wars and ugly :not() selectors,
especially in dark theme. */
a { a {
cursor: pointer; cursor: pointer;
color: var(--color-text-generic-link);
text-decoration: none;
}
&.message_label_clickable:hover { a:hover,
cursor: pointer; a:focus {
color: hsl(200deg 100% 40%); color: var(--color-text-generic-link-interactive);
text-decoration: underline;
& code {
color: var(--color-text-generic-link-interactive);
} }
} }

View File

@ -57,15 +57,6 @@ label,
button { button {
cursor: pointer; cursor: pointer;
} }
a {
color: #0088cc;
text-decoration: none;
}
a:hover,
a:focus {
color: #005580;
text-decoration: underline;
}
p { p {
margin: 0 0 10px; margin: 0 0 10px;
} }