Skip to content

Commit 2c873de

Browse files
committed
style: improve scrollbar styling on the query editor
This changes makes scrollbars in the graphiql editor transparent, so that they look better integrated in the interface
1 parent 03ab3a6 commit 2c873de

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.changeset/transparent-scrollbars.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@graphiql/react": patch
3+
"graphiql": patch
4+
---
5+
6+
style: improve scrollbar styling on the query editor

packages/graphiql-react/src/style/root.css

+12
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,15 @@ body.graphiql-dark [data-radix-popper-content-wrapper] {
146146
}
147147
}
148148
}
149+
150+
/* Transparent scrollbars, without backgrounds */
151+
.graphiql-container .CodeMirror-hscrollbar,
152+
.graphiql-container .CodeMirror-vscrollbar {
153+
scrollbar-color: #88888888 transparent;
154+
}
155+
156+
/* The little square between H and V scrollbars */
157+
.graphiql-container .CodeMirror-scrollbar-filler,
158+
.graphiql-container .CodeMirror-gutter-filler {
159+
background-color: transparent;
160+
}

0 commit comments

Comments
 (0)