feat(calc-01): add distinct styles for backspace and escape keys

This commit is contained in:
2026-04-25 02:54:23 +02:00
parent 223bf56339
commit 84451d0abc
2 changed files with 14 additions and 2 deletions
+12
View File
@@ -17,6 +17,10 @@
--key-op-bottom: #304661;
--key-danger-top: #7a5050;
--key-danger-bottom: #553636;
--key-soft-danger-top: #86605a;
--key-soft-danger-bottom: #61433e;
--key-cancel-top: #5f6b7c;
--key-cancel-bottom: #3f4857;
--key-enter-top: #7d9079;
--key-enter-bottom: #4d614b;
--border: #11151c;
@@ -325,6 +329,14 @@ button:active {
background: linear-gradient(180deg, var(--key-danger-top), var(--key-danger-bottom));
}
.key-soft-danger {
background: linear-gradient(180deg, var(--key-soft-danger-top), var(--key-soft-danger-bottom));
}
.key-cancel {
background: linear-gradient(180deg, var(--key-cancel-top), var(--key-cancel-bottom));
}
.key-enter {
background: linear-gradient(180deg, var(--key-enter-top), var(--key-enter-bottom));
grid-row: span 2;
+2 -2
View File
@@ -87,8 +87,8 @@ const topButtons = {
{ type: 'command', value: 'e', label: 'e', className: 'key-function' },
],
del: { type: 'command', value: 'clear', label: 'DEL', className: 'key-danger' },
backspace: { type: 'action', value: 'backspace', label: '⌫', className: 'key-danger' },
escape: { type: 'action', value: 'escape', label: 'ESC', className: 'key-danger' },
backspace: { type: 'action', value: 'backspace', label: '⌫', className: 'key-soft-danger' },
escape: { type: 'action', value: 'escape', label: 'ESC', className: 'key-cancel' },
};
let stackCursor = null;