feat(calc-02): add cursor-aware editing in the X stack display

This commit is contained in:
2026-05-16 23:30:50 +02:00
parent 6a37c7c1e8
commit acc075d30c
2 changed files with 118 additions and 18 deletions
+35
View File
@@ -137,6 +137,10 @@ body {
justify-self: end;
font-size: 20px;
}
.stack-value.is-editing {
letter-spacing: 0.02em;
}
.display-buttons-panel {
padding: 8px;
min-height: 0;
@@ -379,6 +383,37 @@ button:active {
outline-offset: 2px;
}
.stack-value.is-editing {
display: inline-flex;
align-items: center;
justify-content: flex-end;
gap: 0;
}
.edit-text {
display: inline-block;
white-space: pre;
}
.edit-caret {
display: inline-block;
width: 1px;
height: 1em;
margin: 0 0.12ch;
background: currentColor;
animation: caret-blink 1s steps(1, end) infinite;
transform: translateY(0.02em);
}
@keyframes caret-blink {
0%, 49% {
opacity: 1;
}
50%, 100% {
opacity: 0.15;
}
}
.key-default {
background: linear-gradient(180deg, var(--btnTop), var(--btnBottom));
color: #eef2f7;