[8.15] Fix "Elastic did not load properly" message color when system in dark mode (#187653) (#187670)

# Backport

This will backport the following commits from `main` to `8.15`:
- [Fix "Elastic did not load properly" message color when
system in dark mode
(#187653)](https://github.com/elastic/kibana/pull/187653)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Anton
Dosov","email":"anton.dosov@elastic.co"},"sourceCommit":{"committedDate":"2024-07-05T12:30:42Z","message":"Fix
\"Elastic did not load properly\" message color when system in dark mode
(#187653)\n\n## Summary\r\n\r\nfix
https://github.com/elastic/kibana/issues/187570\r\n\r\nThe problem was
that when the system/browser was in dark mode, the\r\ndefault text color
became white, but the background was forced to a\r\nspecific bright
color, so the text became unreadable. A quick fix is to\r\nalso force
the text color (I used EUI text colors)\r\n\r\n\r\n<img width=\"858\"
alt=\"Screenshot 2024-07-05 at 12 44
11\"\r\nsrc=\"9ccefc04-60f6-46e3-a649-4e47cad043ac\">","sha":"305f66522c2cd4d2c578b33b9f62464de97d7190","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","Feature:Chrome","v8.16.0"],"title":"Fix
\"Elastic did not load properly\" message color when system in dark
mode","number":187653,"url":"https://github.com/elastic/kibana/pull/187653","mergeCommit":{"message":"Fix
\"Elastic did not load properly\" message color when system in dark mode
(#187653)\n\n## Summary\r\n\r\nfix
https://github.com/elastic/kibana/issues/187570\r\n\r\nThe problem was
that when the system/browser was in dark mode, the\r\ndefault text color
became white, but the background was forced to a\r\nspecific bright
color, so the text became unreadable. A quick fix is to\r\nalso force
the text color (I used EUI text colors)\r\n\r\n\r\n<img width=\"858\"
alt=\"Screenshot 2024-07-05 at 12 44
11\"\r\nsrc=\"9ccefc04-60f6-46e3-a649-4e47cad043ac\">","sha":"305f66522c2cd4d2c578b33b9f62464de97d7190"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/187653","number":187653,"mergeCommit":{"message":"Fix
\"Elastic did not load properly\" message color when system in dark mode
(#187653)\n\n## Summary\r\n\r\nfix
https://github.com/elastic/kibana/issues/187570\r\n\r\nThe problem was
that when the system/browser was in dark mode, the\r\ndefault text color
became white, but the background was forced to a\r\nspecific bright
color, so the text became unreadable. A quick fix is to\r\nalso force
the text color (I used EUI text colors)\r\n\r\n\r\n<img width=\"858\"
alt=\"Screenshot 2024-07-05 at 12 44
11\"\r\nsrc=\"9ccefc04-60f6-46e3-a649-4e47cad043ac\">","sha":"305f66522c2cd4d2c578b33b9f62464de97d7190"}}]}]
BACKPORT-->

Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2024-07-08 15:32:48 +02:00 committed by GitHub
parent 49cba8250d
commit c47cca3e30
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View file

@ -64,10 +64,12 @@ if (window.__kbnStrictCsp__ && window.__kbnCspNotEnforced__) {
var errorTitleEl = document.createElement('h1');
errorTitleEl.innerText = errorTitle;
errorTitleEl.style.margin = '20px';
errorTitleEl.style.color = '#1a1c21';
var errorTextEl = document.createElement('p');
errorTextEl.innerText = errorText;
errorTextEl.style.margin = '20px';
errorTextEl.style.color = '#343741';
var errorReloadEl = document.createElement('button');
errorReloadEl.innerText = errorReload;

View file

@ -80,10 +80,12 @@ if (window.__kbnStrictCsp__ && window.__kbnCspNotEnforced__) {
var errorTitleEl = document.createElement('h1');
errorTitleEl.innerText = errorTitle;
errorTitleEl.style.margin = '20px';
errorTitleEl.style.color = '#1a1c21';
var errorTextEl = document.createElement('p');
errorTextEl.innerText = errorText;
errorTextEl.style.margin = '20px';
errorTextEl.style.color = '#343741';
var errorReloadEl = document.createElement('button');
errorReloadEl.innerText = errorReload;