Skip to content

Commit

Permalink
TTYG leave space for scroll gutters
Browse files Browse the repository at this point in the history
- Reserve space for scroll gutters
- Don't change overall spacing

- Having gutters cover content is annoying

- Padding inside all central elements (toolbar, chat, input)
- Plus: less padding outside
- Equals: gaps for gutters and same spacing
  • Loading branch information
Pavel Mihaylov authored and svilenvelikov committed Oct 14, 2024
1 parent 8bab172 commit 17ba09e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
9 changes: 4 additions & 5 deletions src/css/ttyg/chat-panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@
overflow-y: hidden;
scrollbar-gutter: stable;
/*
this padding is needed to prevent a safari weirdness with the invisible scroll gutter
hiding the border of the explain boxes
(needed on the right only but set also left to keep the symetry)
space for scroll gutters - we don't want them inside the chat
*/
padding-left: 1px;
padding-right: 1px;
padding-left: 1rem;
padding-right: 1rem;
}

.chat-panel:hover .chat-details {
Expand Down Expand Up @@ -68,6 +66,7 @@

.chat-panel .new-question {
width: 100%;
padding: 0 1rem;
}

.chat-panel .new-question .question-input {
Expand Down
5 changes: 2 additions & 3 deletions src/css/ttyg/ttyg.css
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,15 @@ chat area
}

.ttyg-view .chat-content {
padding: 0 2rem;
}

.ttyg-view .chat-content .toolbar {
margin: auto;
padding: 0;
padding: 0 1rem;
}

.ttyg-view .chat-content .chat {
max-width: 800px;
max-width: calc(800px + 2rem);
margin: auto;
height: calc(100vh - 13em);
display: flex;
Expand Down

0 comments on commit 17ba09e

Please sign in to comment.