diff --git a/apps/sim/app/_styles/globals.css b/apps/sim/app/_styles/globals.css index 64fa865241d..ecdff6f7b2b 100644 --- a/apps/sim/app/_styles/globals.css +++ b/apps/sim/app/_styles/globals.css @@ -491,6 +491,13 @@ html.sidebar-booting .sidebar-shell-inner { outline: none; } + /* Consistent branded text-selection color everywhere, independent of the + browser/OS default (which dims when the window loses focus). */ + ::selection { + background-color: var(--selection); + color: var(--white); + } + body { background-color: var(--bg); color: var(--text-primary); diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.css b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.css index 448583bcf9e..84d727723b3 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.css +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.css @@ -110,13 +110,6 @@ text-decoration: line-through; } -/* Selecting struck-through text reads in the primary color like any other highlighted text, so the - selection looks uniform (it returns to the muted strike color when deselected). */ -.rich-markdown-prose del::selection, -.rich-markdown-prose s::selection { - color: var(--text-primary); -} - .rich-markdown-prose a { color: var(--brand-secondary); cursor: pointer; @@ -126,14 +119,6 @@ text-decoration: underline; } -/* When a link is selected, drop its blue so it reads like any other highlighted text — the standard - MD-editor convention (Linear, Slack) where the selection takes precedence over the link color. - Only the selected state is affected; an unselected link stays blue. */ -.rich-markdown-prose a::selection, -.rich-markdown-prose a ::selection { - color: var(--text-primary); -} - /* Render the gap cursor (e.g. above a leading divider) as a normal vertical caret rather than ProseMirror's default short horizontal bar, which reads as a stray underscore. */ .rich-markdown-prose .ProseMirror-gapcursor::after {