Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,13 @@ export interface SupersetSpecificTokens {
echartsOptionsOverridesByChartType?: {
[chartType: string]: any;
};

// Editor-related
/**
* Background color for code editor text selection.
* Defaults to colorPrimaryBgHover if not specified.
*/
colorEditorSelection?: string;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ export function AsyncAceEditor(
}
/* Adjust selection color */
.ace_editor .ace_selection {
background-color: ${token.colorPrimaryBgHover} !important;
background-color: ${token.colorEditorSelection ??
token.colorPrimaryBgHover} !important;
}

/* Improve active line highlighting */
Expand Down
7 changes: 7 additions & 0 deletions superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,8 @@ class D3TimeFormat(TypedDict, total=False):
"fontWeightNormal": "400",
"fontWeightLight": "300",
"fontWeightStrong": "500",
# Editor selection color (for SQL Lab text highlighting)
"colorEditorSelection": "#fff5cf",
},
"algorithm": "default",
}
Expand All @@ -813,6 +815,11 @@ class D3TimeFormat(TypedDict, total=False):
# Set to None to disable dark mode
THEME_DARK: Optional[Theme] = {
**THEME_DEFAULT,
"token": {
**THEME_DEFAULT["token"],
# Darker selection color for dark mode
"colorEditorSelection": "#5c4d1a",
},
"algorithm": "dark",
}

Expand Down
Loading