Expose TextField and TextArea looked-up color variables
This commit is contained in:
parent
0a0949af66
commit
465f199911
@ -13,10 +13,14 @@
|
||||
}
|
||||
|
||||
.text-field {
|
||||
-color-input-bg: transparent;
|
||||
-color-input-fg: -color-contrast-checker-fg;
|
||||
-color-input-border: transparent;
|
||||
-color-input-bg-focused: transparent;
|
||||
-color-input-border-focused: transparent;
|
||||
|
||||
-fx-background-insets: 0;
|
||||
-fx-background-color: transparent;
|
||||
-fx-background-radius: 0;
|
||||
-fx-text-fill: -color-contrast-checker-fg;
|
||||
-fx-border-color: -color-contrast-checker-fg;
|
||||
-fx-border-width: 0 0 1 0;
|
||||
}
|
||||
|
@ -2,21 +2,54 @@
|
||||
|
||||
@use "../settings/config" as cfg;
|
||||
|
||||
$color-bg: -color-bg-default !default;
|
||||
$color-fg: -color-fg-default !default;
|
||||
$color-border: -color-border-default !default;
|
||||
|
||||
$color-bg-focused: -color-bg-default !default;
|
||||
$color-border-focused: -color-accent-emphasis !default;
|
||||
|
||||
$color-bg-highlight: -color-accent-subtle !default;
|
||||
$color-fg-highlight: -color-fg-default !default;
|
||||
|
||||
$color-bg-success: -color-bg-default !default;
|
||||
$color-fg-success: -color-success-emphasis !default;
|
||||
$color-border-success: -color-success-fg !default;
|
||||
|
||||
$color-bg-danger: -color-bg-default !default;
|
||||
$color-fg-danger: -color-danger-emphasis !default;
|
||||
$color-border-danger: -color-danger-fg !default;
|
||||
|
||||
// not exposed as looked-up color variables
|
||||
$color-fg-placeholder: -color-fg-subtle !default;
|
||||
$color-fg-password: -color-fg-muted !default;
|
||||
|
||||
.text-input {
|
||||
-fx-background-color: -color-border-default, -color-bg-default;
|
||||
|
||||
-color-input-bg: $color-bg;
|
||||
-color-input-fg: $color-fg;
|
||||
-color-input-border: $color-border;
|
||||
|
||||
-color-input-bg-focused: $color-bg-focused;
|
||||
-color-input-border-focused: $color-border-focused;
|
||||
|
||||
-color-input-bg-highlight: $color-bg-highlight;
|
||||
-color-input-fg-highlight: $color-fg-highlight;
|
||||
|
||||
-fx-background-color: -color-input-border, -color-input-bg;
|
||||
-fx-background-insets: 0, cfg.$border-width;
|
||||
-fx-background-radius: cfg.$border-radius;
|
||||
-fx-text-fill: -color-fg-default;
|
||||
-fx-text-fill: -color-input-fg;
|
||||
|
||||
-fx-highlight-fill: -color-accent-subtle;
|
||||
-fx-highlight-text-fill: -color-fg-default;
|
||||
-fx-prompt-text-fill: -color-fg-subtle;
|
||||
-fx-highlight-fill: -color-input-bg-highlight;
|
||||
-fx-highlight-text-fill: -color-input-fg-highlight;
|
||||
-fx-prompt-text-fill: $color-fg-placeholder;
|
||||
|
||||
-fx-padding: cfg.$padding-y cfg.$padding-x cfg.$padding-y cfg.$padding-x;
|
||||
-fx-cursor: text;
|
||||
|
||||
&:focused {
|
||||
-fx-background-color: -color-accent-emphasis, -color-bg-default;
|
||||
-fx-background-color: -color-input-border-focused, -color-input-bg-focused;
|
||||
-fx-prompt-text-fill: transparent;
|
||||
}
|
||||
|
||||
@ -30,13 +63,17 @@
|
||||
}
|
||||
|
||||
&:success {
|
||||
-fx-background-color: -color-success-emphasis, -color-bg-default;
|
||||
-fx-text-fill: -color-success-fg;
|
||||
-color-input-bg: $color-bg-success;
|
||||
-color-input-fg: $color-fg-success;
|
||||
-color-input-border: $color-border-success;
|
||||
-color-input-border-focused: $color-border-success;
|
||||
}
|
||||
|
||||
&:danger {
|
||||
-fx-background-color: -color-danger-emphasis, -color-bg-default;
|
||||
-fx-text-fill: -color-danger-fg;
|
||||
-color-input-bg: $color-bg-danger;
|
||||
-color-input-fg: $color-fg-danger;
|
||||
-color-input-border: $color-border-danger;
|
||||
-color-input-border-focused: $color-border-danger;
|
||||
}
|
||||
|
||||
// input group
|
||||
@ -80,5 +117,5 @@
|
||||
}
|
||||
|
||||
.password-field {
|
||||
-fx-text-fill: -color-fg-muted;
|
||||
-fx-text-fill: $color-fg-password;
|
||||
}
|
Loading…
Reference in New Issue
Block a user