From 9763a79c01986037e4e7cc9abd8b6e7fe046a052 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 12 May 2025 18:00:14 -0400 Subject: [PATCH] [mv3] Minor CSS adjustments --- platform/mv3/extension/css/popup.css | 4 ++-- platform/mv3/extension/js/theme.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/platform/mv3/extension/css/popup.css b/platform/mv3/extension/css/popup.css index 497c42d59..66fffe5d2 100644 --- a/platform/mv3/extension/css/popup.css +++ b/platform/mv3/extension/css/popup.css @@ -12,7 +12,7 @@ --popup-gap-extra-thin: calc(0.25 * var(--popup-gap)); --popup-main-min-width: calc( var(--filtering-mode-slider-width) + - var(--filtering-mode-button-size) / 2 + var(--filtering-mode-button-size) ); --popup-firewall-min-width: 30em; --popup-rule-cell-width: 5em; @@ -43,7 +43,7 @@ a { align-self: inherit; } :root.mobile #main { - min-width: 100%; + /*min-width: 100%;*/ } hr { border: 0; diff --git a/platform/mv3/extension/js/theme.js b/platform/mv3/extension/js/theme.js index a20d459f0..d816250a3 100644 --- a/platform/mv3/extension/js/theme.js +++ b/platform/mv3/extension/js/theme.js @@ -34,5 +34,7 @@ import { dom } from './dom.js'; { const mql = self.matchMedia('(hover: hover)'); - dom.cl.toggle(dom.html, 'mobile', mql.matches !== true); + const isTouchScreen = mql.matches !== true; + dom.cl.toggle(dom.html, 'mobile', isTouchScreen); + dom.cl.toggle(dom.html, 'desktop', isTouchScreen === false); }