dennis-zhao commited on
Commit
aad5d8e
·
verified ·
1 Parent(s): 270d701

Keep Parse interface readable in dark mode

Browse files
Files changed (1) hide show
  1. style.css +198 -0
style.css CHANGED
@@ -1048,6 +1048,204 @@ body,
1048
  border-radius: 0 !important;
1049
  }
1050
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1051
  @media (max-width: 900px) {
1052
  .product-header {
1053
  padding: 0 15px;
 
1048
  border-radius: 0 !important;
1049
  }
1050
 
1051
+ /*
1052
+ * The Parse interface has an intentionally light visual design. Gradio's
1053
+ * dark theme otherwise leaks dark-mode text and component colors into these
1054
+ * fixed light surfaces, which can leave text with insufficient contrast.
1055
+ */
1056
+ body.dark,
1057
+ body.dark .gradio-container {
1058
+ color-scheme: light;
1059
+ }
1060
+
1061
+ body.dark .gradio-container {
1062
+ --body-background-fill: var(--white);
1063
+ --background-fill-primary: var(--white);
1064
+ --background-fill-secondary: var(--marble-100);
1065
+ --block-background-fill: var(--white);
1066
+ --block-border-color: var(--marble-300);
1067
+ --block-label-background-fill: var(--white);
1068
+ --block-label-text-color: var(--volcanic-700);
1069
+ --body-text-color: var(--volcanic-900);
1070
+ --body-text-color-subdued: var(--volcanic-600);
1071
+ --border-color-primary: var(--marble-300);
1072
+ --button-secondary-background-fill: var(--white);
1073
+ --button-secondary-background-fill-hover: var(--marble-100);
1074
+ --button-secondary-text-color: var(--volcanic-900);
1075
+ --code-background-fill: var(--white);
1076
+ --code-foreground: var(--result-text);
1077
+ --input-background-fill: var(--white);
1078
+ --input-border-color: var(--marble-300);
1079
+ --input-placeholder-color: var(--marble-500);
1080
+ color: var(--volcanic-900);
1081
+ background: var(--white);
1082
+ }
1083
+
1084
+ body.dark .gradio-container .main.app,
1085
+ body.dark .gradio-container main > .column,
1086
+ body.dark #header-shell,
1087
+ body.dark #upload-screen,
1088
+ body.dark #workspace,
1089
+ body.dark #workspace-grid,
1090
+ body.dark #document-pane,
1091
+ body.dark #result-pane,
1092
+ body.dark .settings-heading,
1093
+ body.dark #parse-controls,
1094
+ body.dark #workspace-actions,
1095
+ body.dark #output-tabs,
1096
+ body.dark #output-tabs .tab-wrapper,
1097
+ body.dark #output-tabs .tab-container[role="tablist"],
1098
+ body.dark #output-tabs .tabitem,
1099
+ body.dark .text-output.block,
1100
+ body.dark .visual-output.block {
1101
+ color: var(--volcanic-900) !important;
1102
+ background: var(--white) !important;
1103
+ }
1104
+
1105
+ body.dark .upload-intro h1,
1106
+ body.dark .eyebrow,
1107
+ body.dark .file-name > span:last-child,
1108
+ body.dark .settings-heading,
1109
+ body.dark .settings-heading h2,
1110
+ body.dark #parse-controls label {
1111
+ color: var(--volcanic-900) !important;
1112
+ }
1113
+
1114
+ body.dark .upload-subtitle,
1115
+ body.dark .privacy-note,
1116
+ body.dark .privacy-note a {
1117
+ color: var(--volcanic-600) !important;
1118
+ }
1119
+
1120
+ body.dark .upload-limits {
1121
+ color: var(--marble-500) !important;
1122
+ }
1123
+
1124
+ body.dark #document-upload,
1125
+ body.dark #document-upload .file-preview-holder,
1126
+ body.dark #document-upload .file-preview,
1127
+ body.dark #document-upload .file,
1128
+ body.dark #document-upload .filename,
1129
+ body.dark #document-upload .download {
1130
+ color: var(--volcanic-900) !important;
1131
+ background: var(--white) !important;
1132
+ }
1133
+
1134
+ body.dark #document-upload .download > a,
1135
+ body.dark #document-upload .label-clear-button {
1136
+ color: var(--volcanic-700) !important;
1137
+ }
1138
+
1139
+ body.dark .file-strip,
1140
+ body.dark .file-name,
1141
+ body.dark .file-metrics {
1142
+ color: var(--volcanic-900) !important;
1143
+ background: var(--white) !important;
1144
+ }
1145
+
1146
+ body.dark #parse-controls > .form,
1147
+ body.dark #parse-controls > .form > .block {
1148
+ color: var(--volcanic-900) !important;
1149
+ background: var(--white) !important;
1150
+ }
1151
+
1152
+ body.dark #output-tabs .tab-container[role="tablist"] button {
1153
+ color: #77758b !important;
1154
+ background: transparent !important;
1155
+ }
1156
+
1157
+ body.dark #output-tabs .tab-container[role="tablist"] button[aria-selected="true"] {
1158
+ color: var(--volcanic-900) !important;
1159
+ }
1160
+
1161
+ body.dark .text-output.prose,
1162
+ body.dark .visual-output.prose {
1163
+ color: var(--result-text) !important;
1164
+ background: var(--white) !important;
1165
+ }
1166
+
1167
+ body.dark .text-output.prose :where(p, li, strong, em, blockquote, code, pre),
1168
+ body.dark .visual-output.prose :where(p, li, strong, em, blockquote, code, pre) {
1169
+ color: inherit !important;
1170
+ }
1171
+
1172
+ body.dark .text-output h1,
1173
+ body.dark .text-output h2,
1174
+ body.dark .text-output h3,
1175
+ body.dark .text-output h4 {
1176
+ color: var(--result-text) !important;
1177
+ }
1178
+
1179
+ body.dark .empty-result {
1180
+ color: var(--marble-500) !important;
1181
+ }
1182
+
1183
+ body.dark .empty-result strong {
1184
+ color: var(--volcanic-700) !important;
1185
+ }
1186
+
1187
+ body.dark .output-progress {
1188
+ color: var(--volcanic-600) !important;
1189
+ background: var(--white) !important;
1190
+ }
1191
+
1192
+ body.dark .output-progress strong {
1193
+ color: var(--volcanic-900) !important;
1194
+ }
1195
+
1196
+ body.dark .table-output table,
1197
+ body.dark .table-output th,
1198
+ body.dark .table-output td {
1199
+ border-color: var(--marble-300) !important;
1200
+ color: var(--volcanic-900) !important;
1201
+ background: var(--white) !important;
1202
+ }
1203
+
1204
+ body.dark .table-output th {
1205
+ background: var(--marble-100) !important;
1206
+ }
1207
+
1208
+ body.dark .raw-output,
1209
+ body.dark .raw-output .wrap,
1210
+ body.dark .raw-output .codemirror-wrapper,
1211
+ body.dark .raw-output .cm-editor,
1212
+ body.dark .raw-output .cm-scroller,
1213
+ body.dark .raw-output .cm-content,
1214
+ body.dark .raw-output .cm-line {
1215
+ color: var(--result-text) !important;
1216
+ background: var(--white) !important;
1217
+ }
1218
+
1219
+ body.dark .raw-output .cm-content * {
1220
+ color: var(--result-text) !important;
1221
+ }
1222
+
1223
+ body.dark .raw-output .cm-gutters {
1224
+ border-color: var(--marble-300) !important;
1225
+ color: var(--marble-500) !important;
1226
+ background: var(--marble-50) !important;
1227
+ }
1228
+
1229
+ body.dark .raw-output .cm-activeLine,
1230
+ body.dark .raw-output .cm-activeLineGutter {
1231
+ background: var(--marble-100) !important;
1232
+ }
1233
+
1234
+ body.dark .raw-output .cm-selectionBackground {
1235
+ background: #dbe8ff !important;
1236
+ }
1237
+
1238
+ body.dark .raw-output .cm-cursor {
1239
+ border-left-color: var(--volcanic-900) !important;
1240
+ }
1241
+
1242
+ body.dark .configuration-required > *,
1243
+ body.dark .page-limit-alert > *,
1244
+ body.dark .upload-progress > *,
1245
+ body.dark .run-status > * {
1246
+ color: inherit !important;
1247
+ }
1248
+
1249
  @media (max-width: 900px) {
1250
  .product-header {
1251
  padding: 0 15px;