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

style: update overlay style on mobile #15760

Merged
merged 7 commits into from
Mar 12, 2024
Merged
Changes from 3 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
11 changes: 11 additions & 0 deletions packages/vite/src/client/overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,17 @@ code {
cursor: pointer;
}

@media screen and (max-width: 1000px) {
.window {
width: 80vw;
padding: 2.5vh 4vw;
}
bluwy marked this conversation as resolved.
Show resolved Hide resolved
.stack {
white-space: pre-wrap;
word-break: break-all;
}
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if this looks great. The stack trace paths can be long, and I think it's nicer if they're all within a single line and we can scroll it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if this looks great. The stack trace paths can be long, and I think it's nicer if they're all within a single line and we can scroll it.

normally, scroll-x in mobile modal is not good for developer or user , so I think that word-break is necessary

Copy link
Member

Choose a reason for hiding this comment

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

I'll let others chime in about this, but I think it's harder to read if the stack traces are line-wrapped.

Copy link
Member

Choose a reason for hiding this comment

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

I prefer a scrollbar, too. I think it's useful to have the function names lined up vertically.

}

kbd {
line-height: 1.5;
font-family: ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
Expand Down
Loading