У меня есть таблица стилей CSS, которая использует медиа-запросы для изменения отображения страницы в зависимости от того, сколько дюймов она имеет ширину (например, если она меньше 4 дюймов или отображается на карманном устройстве, она предполагает, дружественный ЛАФ).
The problem I have is with its content. On the homepage, there is a dock-style interface that dynamically changes height based on the current height and width of the window so that the text and items never leave the screen. However, my JS that determines this size does not know when the stylesheet has changed for handheld devices or small screens, so the behavior continues unpredictably in this mode. How can I use JavaScript detect when the page is less than or equal to 4 inches so that I can disable the auto-resizing of the then-reformed dock?