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

Use fixed background/color for inputs and textareas #939

Merged
merged 2 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions backend/src/config/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ impl ColorConfig {

// Neutral colors (05 = background, 90 = foreground)
let base_grey = Lch::from_color(self.grey50.0.into_format::<f32>());
add(&mut light, "neutral00", Lch { l: 100.0, ..base_grey });
add(&mut light, "neutral05", Lch { l: 99.7, ..base_grey });
add(&mut light, "neutral10", Lch { l: 95.9, ..base_grey });
add(&mut light, "neutral15", Lch { l: 92.0, ..base_grey });
Expand All @@ -273,6 +274,7 @@ impl ColorConfig {
add(&mut light, "neutral80", Lch { l: 17.0, ..base_grey });
add(&mut light, "neutral90", Lch { l: 8.0, ..base_grey });

add(&mut dark, "neutral00", Lch { l: 5.0, ..base_grey });
add(&mut dark, "neutral05", Lch { l: 7.7, ..base_grey });
add(&mut dark, "neutral10", Lch { l: 11.5, ..base_grey });
add(&mut dark, "neutral15", Lch { l: 15.3, ..base_grey });
Expand Down
9 changes: 8 additions & 1 deletion frontend/src/GlobalStyle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,12 @@ const GLOBAL_STYLE = css({
borderTop: `1px solid ${COLORS.neutral25}`,
},
"p, label": { color: COLORS.neutral80 },
input: { color: COLORS.neutral90 },
"input, textarea": {
backgroundColor: COLORS.neutral00,
color: COLORS.neutral90,
":disabled": {
backgroundColor: COLORS.neutral10,
color: COLORS.neutral70,
},
},
});
1 change: 1 addition & 0 deletions frontend/src/color.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const COLORS = {
happy2: "var(--color-happy2)",
happy2BwInverted: "var(--color-happy2-bw-inverted)",

neutral00: "var(--color-neutral00)",
neutral05: "var(--color-neutral05)",
neutral10: "var(--color-neutral10)",
neutral15: "var(--color-neutral15)",
Expand Down