diff --git a/services/web/frontend/js/features/source-editor/extensions/command-tooltip.ts b/services/web/frontend/js/features/source-editor/extensions/command-tooltip.ts index 567374bdf0..5cbcf298fd 100644 --- a/services/web/frontend/js/features/source-editor/extensions/command-tooltip.ts +++ b/services/web/frontend/js/features/source-editor/extensions/command-tooltip.ts @@ -245,6 +245,30 @@ const commandTooltipTheme = EditorView.baseTheme({ '.ol-cm-command-tooltip-form': { padding: '0 8px', }, + '&dark .ol-cm-command-tooltip-form .form-label': { + color: 'var(--content-secondary-dark)', + }, + // Keep in sync with services/web/frontend/stylesheets/components/form.scss + // The overrides are needed because we theme the controls based on editor + // theme, not overall theme. + '&light .ol-cm-command-tooltip-form .form-control, &light .ol-cm-command-tooltip-form .form-control-wrapper': + { + '--input-field-color': 'var(--content-primary)', + '--input-field-bg': 'var(--bg-light-primary)', + '--input-field-border-color': 'var(--border-primary)', + '--input-placeholder-content': 'var(--content-placeholder)', + '--input-border-hover': 'var(--border-hover)', + '--input-field-content-disabled': 'var(--content-disabled)', + }, + '&dark .ol-cm-command-tooltip-form .form-control, &dark .ol-cm-command-tooltip-form .form-control-wrapper': + { + '--input-field-color': 'var(--content-primary-dark)', + '--input-field-bg': 'var(--bg-dark-primary)', + '--input-field-border-color': 'var(--border-primary-dark)', + '--input-placeholder-content': 'var(--content-placeholder-dark)', + '--input-border-hover': 'var(--border-hover-dark)', + '--input-field-content-disabled': 'var(--content-disabled-dark)', + }, }) export const resolveCommandNode = (state: EditorState) => { diff --git a/services/web/frontend/stylesheets/components/form.scss b/services/web/frontend/stylesheets/components/form.scss index b517397541..bffe483980 100644 --- a/services/web/frontend/stylesheets/components/form.scss +++ b/services/web/frontend/stylesheets/components/form.scss @@ -128,6 +128,7 @@ --form-select-option-disabled-color: var(--content-disabled-dark); } +// Keep in sync with services/web/frontend/js/features/source-editor/extensions/command-tooltip.ts @mixin light-input { --input-field-color: var(--content-primary); --input-field-bg: var(--bg-light-primary); @@ -532,6 +533,7 @@ input[type='range'] { input.form-control[type='text'], input.form-control[type='search'], input.form-control[type='number'], +input.form-control[type='url'], textarea.form-control { color: var(--input-field-color); background-color: var(--input-field-bg);