Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: fix native select background color on Linux, improve other dark more support (#565)

Myles Scolnick4257062b16a4
diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css
index 8769f649f7..dba53fbbea 100644
--- a/docs/_static/css/custom.css
+++ b/docs/_static/css/custom.css
@@ -15,6 +15,13 @@ body .page {
line-height: 1.5rem;
}
+body {
+ color-scheme: light;
+}
+body[data-theme="dark"] {
+ color-scheme: dark;
+}
+
h1,
h2 {
font-family: "CalSans";
diff --git a/frontend/src/css/globals.css b/frontend/src/css/globals.css
index 0f5166036b..acb8cf0bf9 100644
--- a/frontend/src/css/globals.css
+++ b/frontend/src/css/globals.css
@@ -25,6 +25,8 @@
@layer base {
:root {
+ color-scheme: light;
+
/* Radix light colors for reference: https://github.com/radix-ui/colors/blob/main/src/light.ts */
--background: 0 0% 100%;
@@ -95,6 +97,8 @@
}
.dark {
+ color-scheme: dark;
+
/* Radix dark colors for reference: https://github.com/radix-ui/colors/blob/main/src/dark.ts */
--background: 150 7.7% 10.2%; /* sage-2 */
diff --git a/marimo/_smoke_tests/inputs.py b/marimo/_smoke_tests/inputs.py
index 5789b8938a..fc8918d6cd 100644
--- a/marimo/_smoke_tests/inputs.py
+++ b/marimo/_smoke_tests/inputs.py
@@ -1,7 +1,6 @@
-# Copyright 2023 Marimo. All rights reserved.
import marimo
-__generated_with = "0.1.8"
+__generated_with = "0.1.76"
app = marimo.App()
@@ -23,15 +22,25 @@ def __(disabled, mo):
mo.vstack(
[
mo.ui.text(label="Your name", disabled=disabled.value),
- mo.ui.text(
- label="Your tagline", max_length=30, disabled=disabled.value
- ),
- mo.ui.text_area(
- label="Your bio", max_length=180, disabled=disabled.value
- ),
+ mo.ui.text(label="Your tagline", max_length=30, disabled=disabled.value),
+ mo.ui.text_area(label="Your bio", max_length=180, disabled=disabled.value),
]
)
return
+
+def __(mo):
+ options = ["red", "green", "blue"]
+
+ mo.vstack(
+ [
+ mo.ui.dropdown(options, label="Dropdown"),
+ mo.ui.multiselect(options, label="Multi-select"),
+ ]
+ )
+ return options,
+
+
if __name__ == "__main__":
app.run()