some more tweaks

This commit is contained in:
Chris Kruining 2024-10-17 07:38:51 +02:00
parent d000b85429
commit fb4d28b265
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
3 changed files with 11 additions and 3 deletions

View file

@ -28,7 +28,6 @@
& .cell {
display: grid;
place-content: center stretch;
padding: .5em;
border: 1px solid transparent;
border-radius: var(--radii-m);
@ -36,6 +35,14 @@
&:has(textarea:focus) {
border-color: var(--info);
}
& > span {
align-self: center;
}
& > textarea {
min-block-size: 100%;
}
}
& :is(.header, .main, .footer) {

View file

@ -203,8 +203,8 @@ const TextArea: Component<{ key: string, value: string, lang: string, oninput?:
let element: HTMLTextAreaElement;
const resize = () => {
element.style.blockSize = `1px`;
element.style.blockSize = `${11 + element.scrollHeight}px`;
element.style.height = `1px`;
element.style.height = `${11 + element.scrollHeight}px`;
};
const mutate = debounce(() => {

View file

@ -240,6 +240,7 @@ export const selectable = (element: HTMLElement, options: Accessor<{ value: obje
const mode = (() => {
if (append) return SelectionMode.Append;
if (!withRange && isSelected()) return SelectionMode.Toggle;
if (withRange) return SelectionMode.Replace;
return SelectionMode.Normal;
})();