Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add autocommit styles to ace overrides #5327

Merged
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [BUG][Fuctional Test] Make setDefaultAbsoluteRange more robust and update doc views tests ([#5242](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5242))
- [BUG] Add platform "darwin-arm64" to unit test ([#5290](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5290))
- [BUG][Dev Tool] Add dev tool documentation link to dev tool's help menu [#5166](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5166)
- [Dev Tool] Add additional themed styles to ace overrides ([#5327](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5327))

### 🚞 Infrastructure

Expand Down Expand Up @@ -807,4 +808,4 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

### 🔩 Tests

- Update caniuse to fix failed integration tests ([#2322](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2322))
- Update caniuse to fix failed integration tests ([#2322](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2322))
47 changes: 37 additions & 10 deletions src/core/public/styles/_ace_overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
.coreSystemRootDomElement {
.ace-tm {
$aceBackground: tintOrShade($euiColorLightShade, 50%, 0);
$aceActiveLineBackground: transparentize($euiColorLightShade, 0.3);
$aceUrlColor: makeHighContrastColor(#00a69b, $aceBackground);
$aceVarColor: makeHighContrastColor(#0079a5, $aceBackground);
$aceStringColor: makeHighContrastColor(#009926, $aceBackground);

background-color: $euiColorLightestShade;
color: $euiTextColor;
Expand All @@ -21,7 +25,7 @@

.ace_gutter-active-line,
.ace_marker-layer .ace_active-line {
background-color: transparentize($euiColorLightShade, 0.3);
background-color: $aceActiveLineBackground;
}

.ace_snippet-marker {
Expand Down Expand Up @@ -60,11 +64,11 @@
.ace_url,
.ace_start_triple_quote,
.ace_end_triple_quote {
color: makeHighContrastColor(#00a69b, $aceBackground);
color: $aceUrlColor;
}

.ace_multi_string {
color: makeHighContrastColor(#009926, $aceBackground);
color: $aceStringColor;
font-style: italic;
}

Expand Down Expand Up @@ -93,7 +97,7 @@

.ace_storage,
.ace_keyword {
color: makeHighContrastColor(#0079a5, $aceBackground);
color: $aceVarColor
}

.ace_constant {
Expand All @@ -109,7 +113,7 @@
}

.ace_constant.ace_library {
color: makeHighContrastColor(#009926, $aceBackground);
color: $aceStringColor;
}

.ace_invalid {
Expand All @@ -122,7 +126,7 @@
}

.ace_support.ace_constant {
color: makeHighContrastColor(#009926, $aceBackground);
color: $aceStringColor;
}

.ace_support.ace_type,
Expand All @@ -135,27 +139,27 @@
}

.ace_string {
color: makeHighContrastColor(#009926, $aceBackground);
color: $aceStringColor;
}

.ace_comment {
color: makeHighContrastColor(rgb(76, 136, 107), $aceBackground);
}

.ace_comment.ace_doc {
color: makeHighContrastColor(#0079a5, $aceBackground);
color: $aceVarColor;
}

.ace_comment.ace_doc.ace_tag {
color: makeHighContrastColor($euiColorMediumShade, $aceBackground);
}

.ace_constant.ace_numeric {
color: makeHighContrastColor(#0079a5, $aceBackground);
color: $aceVarColor;
}

.ace_variable {
color: makeHighContrastColor(#0079a5, $aceBackground);
color: $aceVarColor;
}

.ace_xml-pe {
Expand Down Expand Up @@ -207,5 +211,28 @@
background: $euiColorLightestShade;
border: $euiBorderThin;
}

&.ace_editor.ace_autocomplete {
background-color: $euiColorLightestShade;
color: makeHighContrastColor($euiTextColor,
$aceBackground);
.ace_completion-highlight {
color: $aceUrlColor;
}

.ace_marker-layer .ace_active-line {
background-color: $aceActiveLineBackground;
}
}

.ace_rightAlignedText {
color: $aceVarColor;
}

.ace_tooltip {
background-color: $aceBackground;
color: $euiTextColor;
}

}
}
Loading