Bug 1572085 - Adds functionality to show long hex. r=johannh

Differential Revision: https://phabricator.services.mozilla.com/D41599

--HG--
extra : moz-landing-system : lando
This commit is contained in:
dleblanccyr 2019-08-15 19:15:48 +00:00
parent c049730cc6
commit 7a91ae4044
2 changed files with 24 additions and 0 deletions

View File

@ -7,6 +7,10 @@
display: contents;
}
:host * {
padding: 1px 0;
}
label {
text-align: right;
margin-inline-end: 0;
@ -27,6 +31,23 @@ label:dir(rtl) {
white-space: nowrap;
}
.long-hex:hover {
border-top: 1px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
background-color: rgba(0, 0, 0, 0.06);
padding: 0px;
}
.long-hex-open {
white-space: normal;
}
:host(.value) *,
:host(.method) *,
:host(.padding) * {
padding-bottom: 10px;
}
:host(.value) *,
:host(.method) *,
:host(.padding) * {

View File

@ -39,6 +39,9 @@ export class InfoItem extends HTMLElement {
// TODO: Use Fluent-friendly condition.
if (this.item.label === "Modulus") {
info.classList.add("long-hex");
this.addEventListener("click", () => {
info.classList.toggle("long-hex-open");
});
}
}
}