Skip to content

Commit 8d2abc2

Browse files
fix(sqllab): add colorEditorSelection token for visible text selection
1 parent 9aff89c commit 8d2abc2

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

  • superset-frontend/packages
    • superset-core/src/ui/theme
    • superset-ui-core/src/components/AsyncAceEditor

superset-frontend/packages/superset-core/src/ui/theme/types.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@ export interface SupersetSpecificTokens {
159159
echartsOptionsOverridesByChartType?: {
160160
[chartType: string]: any;
161161
};
162+
163+
// Editor-related
164+
/**
165+
* Background color for code editor text selection.
166+
* Defaults to colorPrimaryBgHover if not specified.
167+
*/
168+
colorEditorSelection?: string;
162169
}
163170

164171
/**

superset-frontend/packages/superset-ui-core/src/components/AsyncAceEditor/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,8 @@ export function AsyncAceEditor(
294294
}
295295
/* Adjust selection color */
296296
.ace_editor .ace_selection {
297-
background-color: ${token.colorPrimaryBgHover} !important;
297+
background-color: ${token.colorEditorSelection ??
298+
token.colorPrimaryBgHover} !important;
298299
}
299300
300301
/* Improve active line highlighting */

0 commit comments

Comments
 (0)