fx-compat: Fix some CE style conflicts

- Windows global styles make .header bold, so we'll override them
- Prefix IDs in <notes-box>
- Give <tags-box> Add button a normal margin
  - I think the CSS this removes was meant to apply to tags in the list, not the
    Add button, but that's handled elsewhere now
This commit is contained in:
Abe Jellinek 2023-04-05 12:39:32 -04:00
parent fcf3cec0fc
commit 5d44089214
3 changed files with 9 additions and 12 deletions

View file

@ -119,10 +119,6 @@ tree {
padding-left: 0.05em;
}
#tags-box button {
margin: .04em 0 0 .15em !important;
}
.zotero-editpane-tabs spacer {
border: 0;
}

View file

@ -39,10 +39,10 @@
<box flex="1" style="display: flex" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<div style="flex-grow: 1" xmlns="http://www.w3.org/1999/xhtml">
<div class="header">
<label id="num"/>
<button id="add">&zotero.item.add;</button>
<label id="notes-num"/>
<button id="notes-add">&zotero.item.add;</button>
</div>
<div id="grid" class="grid"/>
<div id="notes-grid" class="grid"/>
</div>
</box>
`, ['chrome://zotero/locale/zotero.dtd']);
@ -55,7 +55,7 @@
let content = document.importNode(this.content, true);
this.append(content);
this._id('add').addEventListener('click', this._handleAdd);
this._id('notes-add').addEventListener('click', this._handleAdd);
this._notifierID = Zotero.Notifier.registerObserver(this, ['item'], 'notesBox');
}
@ -115,9 +115,9 @@
}
this._noteIDs = this._item.getNotes();
this._id('add').hidden = this._mode != 'edit';
this._id('notes-add').hidden = this._mode != 'edit';
let grid = this._id('grid');
let grid = this._id('notes-grid');
grid.replaceChildren();
let notes = Zotero.Items.get(this._item.getNotes());
@ -147,7 +147,7 @@
}
let num = this._noteIDs.length;
this._id('num').replaceChildren(Zotero.getString('pane.item.notes.count', num, num));
this._id('notes-num').replaceChildren(Zotero.getString('pane.item.notes.count', num, num));
}
_handleAdd = (event) => {
@ -166,7 +166,7 @@
}
_id(id) {
return this.querySelector(`[id=${id}]`);
return this.querySelector(`#${id}`);
}
}
customElements.define("notes-box", NotesBox);

View file

@ -1,5 +1,6 @@
notes-box, related-box {
.header {
font-weight: normal;
display: flex;
padding-left: 10px;
align-items: center;