diff --git a/src/xlsx_clean/ui/index.html b/src/xlsx_clean/ui/index.html
index 8d2a044..cf3a31b 100644
--- a/src/xlsx_clean/ui/index.html
+++ b/src/xlsx_clean/ui/index.html
@@ -184,31 +184,49 @@
line-height: 1.5;
}
- .fields { display: grid; gap: 18px; }
+ .fields { display: grid; gap: 22px; }
.field {
position: relative;
display: block;
- padding-top: 8px;
}
.field-label {
position: absolute;
- z-index: 1;
- top: 0;
- left: 11px;
+ z-index: 2;
+ top: 50%;
+ left: 12px;
padding: 0 4px;
- background: var(--label-bg);
- color: var(--primary);
- font-size: 0.75rem;
- line-height: 1rem;
+ background: transparent;
+ color: var(--text-muted);
+ font-size: 1rem;
+ line-height: 1;
pointer-events: none;
+ transform: translateY(-50%);
+ transform-origin: left center;
+ transition:
+ top 180ms var(--ease),
+ font-size 180ms var(--ease),
+ color 180ms var(--ease),
+ background-color 180ms var(--ease);
+ }
+
+ .field.is-floated .field-label,
+ .field:focus-within .field-label {
+ top: 0;
+ font-size: 0.75rem;
+ background: var(--label-bg);
+ color: var(--text-muted);
+ }
+
+ .field:focus-within .field-label {
+ color: var(--primary);
}
select, input {
width: 100%;
min-height: 54px;
- padding: 16px 12px 6px;
+ padding: 16px 12px;
border: 1px solid var(--border-strong);
border-radius: var(--radius-sm);
outline: none;
@@ -218,6 +236,14 @@
transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
+ .field input::placeholder {
+ color: transparent;
+ }
+
+ .field:focus-within input::placeholder {
+ color: var(--text-dim);
+ }
+
.combobox-input {
padding-right: 36px;
cursor: text;
@@ -487,6 +513,14 @@
});
syncThemeToggle();
+ function syncFloat(inputEl) {
+ const field = inputEl.closest(".field");
+ if (!field) return;
+ const filled = inputEl.value.trim().length > 0;
+ const focused = document.activeElement === inputEl;
+ field.classList.toggle("is-floated", filled || focused);
+ }
+
// Builds a searchable combobox. The underlying