fx140: Add draft macOS native-like textarea style

Firefox doesn't use any native textareas anymore, so I guess they just
removed/broke native textarea rendering.
This commit is contained in:
Abe Jellinek 2025-07-18 10:54:29 -04:00 committed by Dan Stillman
parent 072b2e3285
commit e4878052aa
7 changed files with 14 additions and 5 deletions

View file

@ -393,7 +393,7 @@ var CollectionTree = class CollectionTree extends LibraryTree {
label.className = 'cell-text';
label.dataset.rowId = treeRow.id;
label.setAttribute("size", 5);
label.toggleAttribute("no-windows-native", true);
label.toggleAttribute("no-native", true);
label.value = treeRow.editingName;
label.addEventListener('input', e => this.handleEditingChange(e, index));
label.addEventListener('mousedown', (e) => e.stopImmediatePropagation());

View file

@ -310,7 +310,7 @@
// tabindex for keyboard handling
input.setAttribute("tabindex", 0);
// hide windows appearance from _input.scss
input.setAttribute("no-windows-native", true);
input.setAttribute("no-native", true);
input.setAttribute("data-arrow-nav-enabled", true);
input.className = "input empty";
input.setAttribute("data-l10n-id", "integration-citationDialog-input");

View file

@ -227,7 +227,7 @@
}
input.rows = 1;
input.classList.add('input');
input.toggleAttribute("no-windows-native", true);
input.toggleAttribute("no-native", true);
input.addEventListener('input', this._handleInput);
input.addEventListener('change', this._handleChange);
input.addEventListener('focus', this._handleFocus);

View file

@ -0,0 +1,7 @@
// TODO: Fx140: Give this a border/shadow when not :focus-visible?
:where(textarea:not([no-native])) {
appearance: none;
border: none;
border-radius: 2px;
@include focus-ring;
}

View file

@ -15,5 +15,6 @@
// Components
@import "mac/components/input";
@import "mac/components/menupopup";
@import "mac/components/menulist";

View file

@ -60,7 +60,7 @@
textbox,
search-textbox,
textarea
):where(:not([no-windows-native])) {
):where(:not([no-native])) {
appearance: none;
height: 26px;
padding: 0;
@ -126,6 +126,6 @@
}
}
textarea:not([no-windows-native]) {
textarea:not([no-native]) {
height: unset;
}

View file

@ -9,6 +9,7 @@
@import "mac/tabBar";
@import "mac/tabbox";
@import "mac/titleBar";
@import "mac/components/input";
@import "mac/components/menupopup";
@import "mac/components/menulist";
@import "mac/citationExplorer";