Storybook: Viewport styling changes

Created on 8 Mar 2019  路  8Comments  路  Source: storybookjs/storybook

Is your feature request related to a problem? Please describe.

Since upgrading to v5, the viewport addon adds a big 10px black border around your viewport and it doesn't look as nice as it used to.

Describe the solution you'd like

I think it would be good to get a way to configure this border or ideally have a way to return to the styling of V4. Putting the viewport in the center of the screen and adding the shadow around it just made more sense to me.

Describe alternatives you've considered

I could write some CSS to manually override the viewport styles but I would imagine there are a few people out there who would like the option to return to the previous styling/functionality so a configuration option would make more sense.

Are you able to assist bring the feature to reality?

Yes

Additional context

V5

screen shot 2019-03-08 at 11 25 21

V4

screen shot 2019-03-08 at 11 19 00

viewport feature request

Most helpful comment

Yay!! I just released https://github.com/storybooks/storybook/releases/tag/v5.0.2 containing PR #5979 that references this issue. Upgrade today to try it out!

All 8 comments

Not sure who changed the border or why. @domyen @ndelangen any comments here? Is that in scope for theming in the near future?

I didn't change the border. The v4 appearance is more handsome imo. Would be open to changing the base UI to something like that if @Glazy wants to open a PR for it.

Something like:

  • 1px border
  • Box-shadow
  • horizontally centered

Zoinks!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.3 containing PR #5979 that references this issue. Upgrade today to try it out!

Because it's a pre-release you can find it on the @next NPM tag.

Yay!! I just released https://github.com/storybooks/storybook/releases/tag/v5.0.2 containing PR #5979 that references this issue. Upgrade today to try it out!

There seems to have been a regression in #7385 (see this line). I've submitted a PR to fix it again.

Not sure why, but this still seems to exist for "@storybook/vue": "^5.3.14", "@storybook/addon-viewport": "^5.3.14".

Screen Shot 2020-04-10 at 12 17 17 PM

@sioanis The PR to update the styling was merged into the v6 branch (https://github.com/storybookjs/storybook/pull/8486)

Ah, I see. Thank you, @connor-baer.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexanbj picture alexanbj  路  3Comments

ZigGreen picture ZigGreen  路  3Comments

purplecones picture purplecones  路  3Comments

miljan-aleksic picture miljan-aleksic  路  3Comments

wahengchang picture wahengchang  路  3Comments