From 3d44057d41f97fdd03043ef4181c5f0ee170f542 Mon Sep 17 00:00:00 2001 From: Thomas Heyenbrock Date: Thu, 30 Jun 2022 18:36:31 +0200 Subject: [PATCH] set default background color for editors (#2528) --- .changeset/serious-actors-accept.md | 5 +++++ packages/graphiql-react/src/editor/style/codemirror.css | 4 ++-- packages/graphiql/src/style.css | 3 --- 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 .changeset/serious-actors-accept.md diff --git a/.changeset/serious-actors-accept.md b/.changeset/serious-actors-accept.md new file mode 100644 index 00000000000..cd32b5d4d9d --- /dev/null +++ b/.changeset/serious-actors-accept.md @@ -0,0 +1,5 @@ +--- +'@graphiql/react': patch +--- + +Set background color for editor to white by default diff --git a/packages/graphiql-react/src/editor/style/codemirror.css b/packages/graphiql-react/src/editor/style/codemirror.css index e0145e1f018..8129212e358 100644 --- a/packages/graphiql-react/src/editor/style/codemirror.css +++ b/packages/graphiql-react/src/editor/style/codemirror.css @@ -12,11 +12,11 @@ font-family: var(--font-family-mono); } -/* Reset any background color */ +/* Set default background color */ .CodeMirror, .CodeMirror-gutters { background: none; - background-color: transparent; + background-color: var(--color-neutral-0); } /* No padding around line number */ diff --git a/packages/graphiql/src/style.css b/packages/graphiql/src/style.css index f8221d3ecab..b67883f5904 100644 --- a/packages/graphiql/src/style.css +++ b/packages/graphiql/src/style.css @@ -17,9 +17,6 @@ flex: 1; flex-direction: column; } -.graphiql-container .graphiql-editors .CodeMirror-gutters { - background-color: var(--color-neutral-0); -} /* The response view */ .graphiql-container .graphiql-response {