Skip to content

Commit

Permalink
Fix (styles): Make ace code editor themes consistent (#4609) (#4616)
Browse files Browse the repository at this point in the history
* Fix (styles): Make ace code editor themes consistent

Use "textmate" theme everywhere
Update override selector to apply to root, to style portaled components, too (such as filter editor)

Signed-off-by: Josh Romero <rmerqg@amazon.com>

* add changelog

Signed-off-by: Josh Romero <rmerqg@amazon.com>

---------

Signed-off-by: Josh Romero <rmerqg@amazon.com>
(cherry picked from commit f8ad83f)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 57d7ce8 commit ee23a6b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/public/styles/_ace_overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

// In order to override the TM (Textmate) theme of Ace/Brace, everywhere,
// it is being scoped by a known outer selector
.application {
.coreSystemRootDomElement {
.ace-tm {
$aceBackground: tintOrShade($euiColorLightShade, 50%, 0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function RawJsonParamEditor({
<>
<EuiCodeEditor
mode="json"
theme="github"
theme="textmate"
width="100%"
height="250px"
value={value}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class MarkdownEditor extends Component {
<EuiCodeEditor
onLoad={this.handleOnLoad}
mode="markdown"
theme="github"
theme="textmate"
width="100%"
height="100%"
name={`ace-${model.id}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class MarkdownPanelConfigUi extends Component {
<EuiSpacer size="s" />
<EuiCodeEditor
mode="less"
theme="github"
theme="textmate"
width="100%"
name={`ace-css-${model.id}`}
setOptions={{ fontSize: '14px' }}
Expand Down

0 comments on commit ee23a6b

Please sign in to comment.