Storybook: Allow meta viewport tag to be customised

Created on 6 Feb 2020  路  7Comments  路  Source: storybookjs/storybook

Bug or support request summary

We have an existing website that we are adding React components to. The website has a viewport tag with the initial scale set to 0.6:

<meta name="viewport" content="width=device-width, initial-scale=0.6">

We would like to set Storybook to use the same initial-scale value so that components rendered there appear the same size as they will on the website.

We've tried adding a viewport tag to preview-head.html but the browser (Chrome) seems to ignore it in favour of the one that Storybook defines above it in the document head.

It would be great if we had the option of replacing the meta viewport tag without our own one.

  • @storybook/react 5.3.9

Affected platforms

  • Chrome on macOS running using the devtools to run as an iPhone 6 device.
core feature request help wanted inactive ui

Most helpful comment

Hi, @eashwar and I are interested in working on this as first-time contributors. Could we take this one?

All 7 comments

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Hi, @eashwar and I are interested in working on this as first-time contributors. Could we take this one?

@christopherhafke absolutely! contributions always welcome!

Unfortunately, due to our schedules, I don't think we're going to be able to work on this issue, and we didn't want to prevent others from tackling it. Sorry about that!

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

miljan-aleksic picture miljan-aleksic  路  3Comments

sakulstra picture sakulstra  路  3Comments

xogeny picture xogeny  路  3Comments

tlrobinson picture tlrobinson  路  3Comments

purplecones picture purplecones  路  3Comments