mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-09-20 18:51:26 -03:00
fix(css): restore the red on destructive context-menu entries
`Delete folder` and `Delete Model` rendered as plain menu text: the rule was `color: var(--danger-color)`, and that token is defined nowhere in the stylesheet tree. A var() reference to an undefined custom property is invalid at computed-value time, so the declaration does not fall back to a default — `color` inherits, and it silently matched the surrounding menu text. Points both the label and its icon (which inherits the colour) at `--lora-error`, the themed error token the delete buttons already use. The shared hover paints the accent background, which a red label does not read against, so destructive entries also get their own `--lora-error-bg` wash. The same dead token was masked by a hardcoded fallback in the settings priority-tags validation state; those now use the themed token too. Fixes all seven destructive entries at once — the four model-card menus, the exclude/duplicates `delete-all` entry and the folder sidebar menu. Guard: tests/frontend/regression/contextMenuTokens.test.js fails if any custom property used by menu.css stops resolving (verified by reverting the token), and if var(--danger-color) ever comes back.
This commit is contained in:
@@ -46,8 +46,20 @@
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Destructive entries. The token used to be the nonexistent `--danger-color`,
|
||||
which made the declaration invalid at computed-value time: the colour then
|
||||
fell back to the menu's inherited text colour, so every "Delete …" entry in
|
||||
the folder and model-card context menus rendered plain. */
|
||||
.context-menu-item.delete-item {
|
||||
color: var(--danger-color);
|
||||
color: var(--lora-error);
|
||||
}
|
||||
|
||||
/* The shared .context-menu-item:hover paints the accent background, which the
|
||||
red label does not read against — destructive entries get their own wash. */
|
||||
.context-menu-item.delete-item:hover,
|
||||
.context-menu-item.delete-item:focus-visible {
|
||||
background-color: var(--lora-error-bg);
|
||||
color: var(--lora-error);
|
||||
}
|
||||
|
||||
.context-menu-item i {
|
||||
|
||||
@@ -747,13 +747,13 @@
|
||||
}
|
||||
|
||||
.priority-tags-input.settings-input-error {
|
||||
border-color: var(--danger-color, #dc2626);
|
||||
box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
|
||||
border-color: var(--lora-error);
|
||||
box-shadow: 0 0 0 2px rgba(from var(--lora-error) r g b / 0.12);
|
||||
}
|
||||
|
||||
.settings-input-error-message {
|
||||
font-size: 0.8em;
|
||||
color: var(--danger-color, #dc2626);
|
||||
color: var(--lora-error);
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user