How can I adjust preview pixel width for mobile device views in HubSpot?

Hi

Wouldn’t it be nice if HubSpot allowed users to adjust the size or width of the pixel dimensions? The reason is because we can see the actual webpage as it would appear on mobile devices since phones come in many sizes.

best regards

Tmzul

Hey @tmzul,

great idea. And it’s being requested for quite some time from many people.

Example: Be able to customize at the tablet breakpoint

Currently breakpoints are set in the theme on a “global” (applied to all pages built with this theme).

So if you got a child-theme or a custom theme (marketplace and default themes are excluded here, as their code is not customizable), look into the theme.json of the used theme.

It should contain something like

"responsive_breakpoints" : [ {
 "name" : "mobile",
 "previewWidth" : {
 "value" : 480,
 "units" : "px"
 },
 "mediaQuery" : "@media (max-width: 480px)",
 "messages" : { }
 } ],

if you change the value of the previewWidth, it will be applied to the preview.

Notes:

  1. Currently, only one breakpoint is allowed
  2. This doesn’t impact the actual CSS rendering/calculation
  3. The mobile preview inside HubSpot might not be 100% accurate. Best practise is using something like browserstack (if you’re developing things), a real device or at least the mobile preview of the browser (also not 100% accurate, but better than the HubSpot preview)

Hope this helps

best,

Anton