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

Minor refinements to codesnippet #195

Merged
merged 3 commits into from
Aug 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/components/CodeSnippets.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ const StyledHighlight = styled(Highlight)`

&& pre[class*='language-'] {
background-color: transparent;
padding: 15px 1rem;
padding-right: 5rem;
padding: 1em 1em 1.5em;
padding-right: 2em;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point of this was to make it so that you could scroll all the way right & not have the "Copy" button overlaying any of the code. So long as you are aware that removing this will break that, I am ok w/ it. Maybe the argument is that you can see it when you are scrolled left?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The internal padding shouldn't trigger the scrollbar unnecessarily.

afaict the scrollbar appears below the content so it doesn't affect the content or the copy functionality.

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The internal padding shouldn't trigger the scrollbar unnecessarily.

That's fair, though it has the potential to overlap slightly:
Screen Shot 2020-08-10 at 11 24 20 AM

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can live with this 👍
image

margin: 0;
background: transparent;
}
`;

Expand Down