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 {
|
& .cell {
|
||||||
display: grid;
|
display: grid;
|
||||||
place-content: center stretch;
|
|
||||||
padding: .5em;
|
padding: .5em;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
border-radius: var(--radii-m);
|
border-radius: var(--radii-m);
|
||||||
|
@ -36,6 +35,14 @@
|
||||||
&:has(textarea:focus) {
|
&:has(textarea:focus) {
|
||||||
border-color: var(--info);
|
border-color: var(--info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
& > span {
|
||||||
|
align-self: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > textarea {
|
||||||
|
min-block-size: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
& :is(.header, .main, .footer) {
|
& :is(.header, .main, .footer) {
|
||||||
|
|
|
@ -203,8 +203,8 @@ const TextArea: Component<{ key: string, value: string, lang: string, oninput?:
|
||||||
let element: HTMLTextAreaElement;
|
let element: HTMLTextAreaElement;
|
||||||
|
|
||||||
const resize = () => {
|
const resize = () => {
|
||||||
element.style.blockSize = `1px`;
|
element.style.height = `1px`;
|
||||||
element.style.blockSize = `${11 + element.scrollHeight}px`;
|
element.style.height = `${11 + element.scrollHeight}px`;
|
||||||
};
|
};
|
||||||
|
|
||||||
const mutate = debounce(() => {
|
const mutate = debounce(() => {
|
||||||
|
|
|
@ -240,6 +240,7 @@ export const selectable = (element: HTMLElement, options: Accessor<{ value: obje
|
||||||
const mode = (() => {
|
const mode = (() => {
|
||||||
if (append) return SelectionMode.Append;
|
if (append) return SelectionMode.Append;
|
||||||
if (!withRange && isSelected()) return SelectionMode.Toggle;
|
if (!withRange && isSelected()) return SelectionMode.Toggle;
|
||||||
|
if (withRange) return SelectionMode.Replace;
|
||||||
return SelectionMode.Normal;
|
return SelectionMode.Normal;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue