diff --git a/src/gui/html/css/style.css b/src/gui/html/css/style.css index 65380f33..17f2b0b7 100644 --- a/src/gui/html/css/style.css +++ b/src/gui/html/css/style.css @@ -38,9 +38,6 @@ html /deep/ ::-webkit-scrollbar-thumb { html /deep/ paper-button[autofocus] { color: #64B5F6; } -.hidden { - display:none; -} a { color: #2196F3; text-decoration: none; diff --git a/src/gui/html/elements/loot-message-dialog.html b/src/gui/html/elements/loot-message-dialog.html index e606a2cb..e6596124 100644 --- a/src/gui/html/elements/loot-message-dialog.html +++ b/src/gui/html/elements/loot-message-dialog.html @@ -38,7 +38,7 @@ was pressed. }, setDismissable: function(isDialogDismissable) { - this.shadowRoot.getElementById('dismiss').classList.toggle('hidden', !isDialogDismissable); + this.shadowRoot.getElementById('dismiss').hidden = !isDialogDismissable; }, onButtonClick: function(evt) { diff --git a/src/gui/html/elements/loot-plugin-card.html b/src/gui/html/elements/loot-plugin-card.html index c8ddd05a..e72ef050 100644 --- a/src/gui/html/elements/loot-plugin-card.html +++ b/src/gui/html/elements/loot-plugin-card.html @@ -116,8 +116,6 @@ loot-clear-metadata font-weight: 400; font-size: 1rem; } - .hidden, - content::content > .hidden, :host-context(#main[data-hide-crc]) content::content > .crc, :host-context(#main[data-hide-tag]) content::content > .tag, :host-context(#main[data-hide-version]) content::content > .version { @@ -285,10 +283,10 @@ loot-clear-metadata var cardContent = this.data.getCardContent(loot.filters); var tagsAdded = this.getElementsByClassName('tag add')[0]; tagsAdded.textContent = cardContent.tags.added; - tagsAdded.classList.toggle('hidden', cardContent.tags.added.length == 0); + tagsAdded.hidden = cardContent.tags.added.length === 0; var tagsRemoved = this.getElementsByClassName('tag remove')[0]; tagsRemoved.textContent = cardContent.tags.removed; - tagsRemoved.classList.toggle('hidden', cardContent.tags.removed.length == 0); + tagsRemoved.hidden = cardContent.tags.removed.length === 0; } }, @@ -308,7 +306,7 @@ loot-clear-metadata messageLi.innerHTML = marked(message.content); messageUL.appendChild(messageLi); }); - messageUL.classList.toggle('hidden', cardContent.messages.length == 0); + messageUL.hidden = cardContent.messages.length === 0; } }, diff --git a/src/gui/html/elements/loot-plugin-item.html b/src/gui/html/elements/loot-plugin-item.html index 2cfb7675..cddea96b 100644 --- a/src/gui/html/elements/loot-plugin-item.html +++ b/src/gui/html/elements/loot-plugin-item.html @@ -165,19 +165,14 @@ onPriorityChange: function(oldValue, newValue) { if (this.data && this.data.priority) { this.shadowRoot.getElementById('priority').textContent = this.data.priority; - this.shadowRoot.getElementById('secondary').classList.remove('hidden'); } else { this.shadowRoot.getElementById('priority').textContent = ''; - this.shadowRoot.getElementById('secondary').classList.add('hidden'); } + this.shadowRoot.getElementById('secondary').hidden = !(this.data && this.data.priority); }, onPriorityIsGlobalChange: function(oldValue, newValue) { - if (this.data && this.data.isPriorityGlobal) { - this.shadowRoot.getElementById('secondary').firstElementChild.classList.remove('hidden'); - } else { - this.shadowRoot.getElementById('secondary').firstElementChild.classList.add('hidden'); - } + this.shadowRoot.getElementById('secondary').hidden = !(this.data && this.data.isPriorityGlobal); }, onEditorStateChange: function(oldValue, newValue) { diff --git a/src/gui/html/elements/loot-search.html b/src/gui/html/elements/loot-search.html index 1fc91aee..5a36f840 100644 --- a/src/gui/html/elements/loot-search.html +++ b/src/gui/html/elements/loot-search.html @@ -29,13 +29,10 @@ searchTarget is the ID of the core-list element to search the elements of. font-size: 0.857rem; color: rgba(255, 255, 255, 0.7); } - .hidden { - display: none; - } -