Skip to content

Commit e889112

Browse files
authored
Fix Dag Code text selection bg (#49649)
1 parent d4b542b commit e889112

File tree

1 file changed

+7
-4
lines changed
  • airflow-core/src/airflow/ui/src/pages/Dag/Code

1 file changed

+7
-4
lines changed

airflow-core/src/airflow/ui/src/pages/Dag/Code/Code.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,13 @@ export const Code = () => {
131131
{/* We want to show an empty state on 404 instead of an error */}
132132
<ErrorAlert error={error ?? (codeError?.status === 404 ? undefined : codeError)} />
133133
<ProgressBar size="xs" visibility={isLoading || isCodeLoading ? "visible" : "hidden"} />
134-
<div
135-
style={{
136-
fontSize: "14px",
134+
<Box
135+
css={{
136+
"& *::selection": {
137+
bg: "gray.emphasized",
138+
},
137139
}}
140+
fontSize="14px"
138141
>
139142
<SyntaxHighlighter
140143
language="python"
@@ -179,7 +182,7 @@ export const Code = () => {
179182
>
180183
{codeError?.status === 404 && !Boolean(code?.content) ? "No Code Found" : (code?.content ?? "")}
181184
</SyntaxHighlighter>
182-
</div>
185+
</Box>
183186
</Box>
184187
);
185188
};

0 commit comments

Comments
 (0)