From 9a0a76ec3c0f2ed02e5fb345e5f9dbfc8e8e004a Mon Sep 17 00:00:00 2001 From: hackademix Date: Wed, 11 Jul 2018 03:03:30 +0200 Subject: [PATCH] Autosize preset buttons part 2. --- src/ui/ui.css | 9 +++++++-- src/ui/ui.js | 3 +-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ui/ui.css b/src/ui/ui.css index 901a4b1..96f7179 100644 --- a/src/ui/ui.css +++ b/src/ui/ui.css @@ -199,12 +199,17 @@ input.preset:active, input.preset:focus, input.preset:hover { #presets-sizer { visibility: hidden; - width: 10px; - height: 1px; + overflow: hidden !important; border: 1px solid red; } +#presets-sizer td.site { + display: none; +} +#presets-sizer span.url { + display: block; +} .presets input.preset:checked, #presets input.preset, #presets-sizer input.preset { opacity: 1; transform: none; diff --git a/src/ui/ui.js b/src/ui/ui.js index 927a712..286d95c 100644 --- a/src/ui/ui.js +++ b/src/ui/ui.js @@ -187,7 +187,6 @@ var UI = (() => { initRow(table = this.table) { let row = table.querySelector("tr.site"); - debug("initRow: ", new Error().stack); // PRESETS { let presets = row.querySelector(".presets"); @@ -225,7 +224,7 @@ var UI = (() => { let labelWidth = 0; for (let l of sizer.querySelectorAll("label.preset")) { let lw = l.offsetWidth; - debug("lw", lw); + debug("lw", l.textContent, lw); if (lw > labelWidth) labelWidth = lw; }