mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-21 01:13:37 +08:00
Gray out optional hard coded key modifiers
This commit is contained in:
parent
4fa0415050
commit
1344841417
@ -478,6 +478,10 @@
|
||||
background: var(--color-button);
|
||||
padding: 2px 5px;
|
||||
}
|
||||
.keybindslot .optional {
|
||||
color: var(--color-subtle_text);
|
||||
padding: 2px 5px;
|
||||
}
|
||||
|
||||
/*Colors*/
|
||||
dialog#theme .dialog_wrapper {
|
||||
|
@ -110,7 +110,10 @@ class Keybind {
|
||||
}
|
||||
if (colorized) {
|
||||
modifiers.forEach((text, i) => {
|
||||
modifiers[i] = `<span class="${i !== modifiers.length-1 ? 'modifier' : 'key'}">${text}</span>`;
|
||||
let type = i !== modifiers.length-1
|
||||
? text.match(/\[\w+\]/) ? 'optional' : 'modifier'
|
||||
: 'key'
|
||||
modifiers[i] = `<span class="${type}">${text}</span>`;
|
||||
})
|
||||
return modifiers.join(`<span class="punctuation"> + </span>`);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user