Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No padding around LivePreview #1325

Closed
baldarian opened this issue Dec 16, 2019 · 13 comments
Closed

No padding around LivePreview #1325

baldarian opened this issue Dec 16, 2019 · 13 comments
Labels
bug Something isn't working fixed Issue fixed and released pending-release Issue fixed but not published to npm yet stale

Comments

@baldarian
Copy link

Bug Report

Describe the bug

There's no padding around LivePreview. Have a look at the screenshot attached below.

I found out that style object that are being passed to the LivePreview are having wrong properties. I made a screenshot for this too.

Environment

  • docz version: [2.2.0]
  • OS: [Windows 10]

Additional context/Screenshots
Untitled
Untitled2

@rakannimer rakannimer added bug Something isn't working fixed Issue fixed and released pending-release Issue fixed but not published to npm yet labels Dec 16, 2019
@rakannimer
Copy link
Contributor

Thanks @baldarian for catching and reporting this !

It will be fixed in the next official release, meanwhile you can try it (2.3.0-alpha.3) with yarn add docz@next

@baldarian
Copy link
Author

@rakannimer Good to hear. Thanks.

@kayosouza
Copy link

kayosouza commented Jan 8, 2020

Thanks @baldarian for catching and reporting this !

It will be fixed in the next official release, meanwhile you can try it (2.3.0-alpha.3) with yarn add docz@next

still dont't work

@stramel
Copy link
Contributor

stramel commented Jan 14, 2020

Confirmed that ^2.3.0-alpha.3 fixed it for me.

UPDATE: @rakannimer While that issue is fixed, it seems that Headings now bump right up next to the Playgrounds?

@abdullahtariq1171
Copy link

abdullahtariq1171 commented Jan 16, 2020

Temporory workaround

Add following CSS in your styles somwhere

div[data-testid="live-preview"] {
  padding: 15px;
}

@floriangosse
Copy link
Contributor

I think the most consistent option would be to replace style={styles.preview} in Playground with sx={styles.preview} so that the styles of this element will be handled by theme-ui as well.

- <LivePreview style={styles.preview} data-testid="live-preview" />
+ <LivePreview sx={styles.preview} data-testid="live-preview" />

This solved the rendering issues in my case.

@drewlustro
Copy link

drewlustro commented Feb 20, 2020

UPDATE: @rakannimer While that issue is fixed, it seems that Headings now bump right up next to the Playgrounds?

Yeah, looks like gatsby-theme-docz@next headers have either an erroneous margin: 0 or the Playground wrapper should have some bottom margin.

I think some bottom margin on Playground is the superior style.

(just noticed #1396 – lol)

I think the most consistent option would be to replace style={styles.preview} in Playground with sx={styles.preview} so that the styles of this element will be handled by theme-ui as well.

@kilianc
Copy link

kilianc commented Mar 26, 2020

This is a temporary patch

// src/gatsby-theme-docz/src/components/Playground/styles.js

export * from 'gatsby-theme-docz/src/components/Playground/styles'

export const preview = {
  margin: 0,
  padding: '20px'
}

@stale
Copy link

stale bot commented May 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 25, 2020
@drewlustro
Copy link

drewlustro commented May 25, 2020 via email

@stale stale bot removed the stale label May 25, 2020
@stale
Copy link

stale bot commented Jul 24, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 24, 2020
@drewlustro
Copy link

drewlustro commented Jul 24, 2020 via email

@stale stale bot closed this as completed Jul 31, 2020
@drewlustro
Copy link

🤦‍♀️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed Issue fixed and released pending-release Issue fixed but not published to npm yet stale
Projects
None yet
Development

No branches or pull requests

8 participants