some more tweaks
This commit is contained in:
parent
d000b85429
commit
fb4d28b265
3 changed files with 11 additions and 3 deletions
|
@ -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) {
|
||||
|
|
|
@ -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(() => {
|
||||
|
|
|
@ -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;
|
||||
})();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue