# Designing for Different Devices (Touch & Hover)

**URL:** https://meta.discourse.org/t/designing-for-different-devices-touch-hover/367810
**Category:** Developer Guides
**Created:** [May 27, 2025, 6:17pm UTC](https://meta.discourse.org/t/designing-for-different-devices-touch-hover/367810 "2025-05-27T18:17:05Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [October 17, 2025, 10:55am UTC](https://meta.discourse.org/t/designing-for-different-devices-touch-hover/367810/7 "2025-10-17T10:55:03Z")

</div>

“Deprecation notice: Accessing `capabilities.viewport.sm` during the site initialization phase is not recommended. Using these values during initialization can lead to errors and inconsistencies when the browser window is resized. Please move these checks to a component, transformer, or API callback that executes during page rendering. [deprecation id: discourse.static-viewport-initialization]”

I’ve been using initialisers to switch on and off various functionality based on whether we are in a mobile view or not (e.g. changing the default Homepage, adding a community section link for example). These aren’t really meant to be dynamic and reactive - suggestions welcome on how to treat these use cases and make sure I can defeat this notice.

---

_[View the full topic](https://meta.discourse.org/t/designing-for-different-devices-touch-hover/367810)._
