Skip to content

Enhance snippet display with scrollbar #252

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

Merged
Merged
Changes from 1 commit
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
19 changes: 19 additions & 0 deletions src/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,25 @@ abbr {
auto-fill,
minmax(min(17.5rem, 100%), 1fr)
); /* [1] */
height: 100%;
max-height: 100vh;
Copy link
Owner

Choose a reason for hiding this comment

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

What do you think about setting lower height like 90vh?

Also, setting min-height would ensure it doesn't get too small and squishy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that's pretty great. I have done this changes in this commit.
Commit Id: 07e5551

overflow-y: auto;
overflow-x: hidden;
padding-bottom: 1rem;
align-content: start;
}

.snippets::-webkit-scrollbar {
width: 8px;
}

.snippets::-webkit-scrollbar-thumb {
background: #888;
Copy link
Owner

Choose a reason for hiding this comment

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

I advise using the CSS custom property for colors as there are dark and light mode.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay. I have implement these changes in this commit.
Commit Id: 07e5551

border-radius: 4px;
}

.snippets::-webkit-scrollbar-thumb:hover {
background: #555;
}

.snippet {
Expand Down