Fix editable-text expansion with non-overlay scrollbars on macOS (#3589)

This commit is contained in:
Abe Jellinek 2024-01-26 02:13:16 -05:00 committed by GitHub
parent c21c5632c2
commit 25d9524c6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -55,7 +55,8 @@ editable-text {
padding: var(--editable-text-padding-block) var(--editable-text-padding-inline);
font: inherit;
line-height: inherit;
color: inherit;
overflow: hidden;
scrollbar-gutter: stable;
}
&:not([nowrap])::after, &:not([nowrap]) .input {
@ -99,10 +100,6 @@ editable-text {
}
&[multiline] {
&::after, .input {
overflow-y: auto;
}
.input {
min-height: 5em;
}
@ -115,9 +112,12 @@ editable-text {
&[hidden] {
display: none;
}
textarea {
// Per https://stackoverflow.com/a/22700700, somehow this removes an extra half-line
// at the bottom of textarea on all platforms with non-overlay scrollbars
textarea {
overflow-x: hidden;
// Match the gutters we apply to ::after
overflow-y: scroll;
}
}