Skip to content

Commit 1f03f38

Browse files
committed
style(rich-editor): selected link reads as normal text, not standout blue
Follows the standard MD-editor convention (Linear, Slack): a highlighted link takes the primary text color so the selection stays legible, instead of keeping its blue on the selection highlight. Scoped to selected links only — no effect on unselected links, regular text, the selection background, or any other surface.
1 parent f109017 commit 1f03f38

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@
111111
text-decoration: underline;
112112
}
113113

114+
/* When a link is selected, drop its blue so it reads like any other highlighted text — the standard
115+
MD-editor convention (Linear, Slack) where the selection takes precedence over the link color.
116+
Only the selected state is affected; an unselected link stays blue. */
117+
.rich-markdown-prose a::selection,
118+
.rich-markdown-prose a ::selection {
119+
color: var(--text-primary);
120+
}
121+
114122
/* Render the gap cursor (e.g. above a leading divider) as a normal vertical caret rather
115123
than ProseMirror's default short horizontal bar, which reads as a stray underscore. */
116124
.rich-markdown-prose .ProseMirror-gapcursor::after {

0 commit comments

Comments
 (0)