openhands openhands commited on
Commit
4f4a27d
·
1 Parent(s): 9cab912

Fix dark mode modebar styling - transparent background with light gray icons

Browse files

- Make modebar, modebar-container, modebar-group, and modebar-btn backgrounds transparent
- Style modebar icons to match the light gray text color (neutral-400)
- Add hover state with slightly lighter color for better UX

This fixes the ugly gray background that appeared when hovering over Plotly figures in dark mode.

Co-authored-by: openhands <openhands@all-hands.dev>

Files changed (1) hide show
  1. content.py +25 -1
content.py CHANGED
@@ -1018,8 +1018,32 @@ h3 .header-link-icon {
1018
  filter: invert(0.88) hue-rotate(180deg);
1019
  }
1020
 
1021
- /* Re-invert the modebar so icons display correctly */
1022
  .dark .js-plotly-plot .modebar {
1023
  filter: invert(1) hue-rotate(180deg);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1024
  }
1025
  """
 
1018
  filter: invert(0.88) hue-rotate(180deg);
1019
  }
1020
 
1021
+ /* Re-invert the modebar so icons display correctly, with transparent background */
1022
  .dark .js-plotly-plot .modebar {
1023
  filter: invert(1) hue-rotate(180deg);
1024
+ background: transparent !important;
1025
+ }
1026
+
1027
+ .dark .js-plotly-plot .modebar-container {
1028
+ background: transparent !important;
1029
+ }
1030
+
1031
+ .dark .js-plotly-plot .modebar-group {
1032
+ background: transparent !important;
1033
+ }
1034
+
1035
+ .dark .js-plotly-plot .modebar-btn {
1036
+ background: transparent !important;
1037
+ }
1038
+
1039
+ /* Style modebar icons to match the light gray text color (after re-inversion) */
1040
+ /* Since we apply invert(1), we need to use the inverted color to get the desired result */
1041
+ /* Target: #82889B (neutral-400). After invert(1) hue-rotate(180deg), use #7d7764 */
1042
+ .dark .js-plotly-plot .modebar-btn path {
1043
+ fill: #7d7764 !important;
1044
+ }
1045
+
1046
+ .dark .js-plotly-plot .modebar-btn:hover path {
1047
+ fill: #4a4533 !important;
1048
  }
1049
  """