From 93ffdf58b95298156355d958c81db98e8136d939 Mon Sep 17 00:00:00 2001 From: Brian Hanson Date: Mon, 21 Sep 2026 21:13:29 -0500 Subject: [PATCH 1/5] Force light theme for graphiql for the moment --- packages/craftcms-graphiql/src/graphiql-init.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/craftcms-graphiql/src/graphiql-init.js b/packages/craftcms-graphiql/src/graphiql-init.js index 99899dc75f5..af03891d0a9 100644 --- a/packages/craftcms-graphiql/src/graphiql-init.js +++ b/packages/craftcms-graphiql/src/graphiql-init.js @@ -30,6 +30,10 @@ const CraftGraphiQL = ({endpoint, selectedSchema}) => { return React.createElement(GraphiQL, { fetcher: graphQLFetcher, + // The CP's own styling for GraphiQL is light-only, and GraphiQL otherwise + // follows the system preference. Forcing it also drops the theme picker + // from its settings dialog. + forcedTheme: 'light', }); }; From 957776ae29bf7c2c81aab3d9eb2365cc38743be6 Mon Sep 17 00:00:00 2001 From: Brian Hanson Date: Mon, 21 Sep 2026 21:13:40 -0500 Subject: [PATCH 2/5] Cleanup graphql pages --- resources/js/pages/graphql/Explore.vue | 2 +- resources/js/pages/graphql/schemas/Edit.vue | 153 ++++++------- resources/js/pages/graphql/schemas/Index.vue | 5 +- resources/js/pages/graphql/tokens/Edit.vue | 226 +++++++++---------- resources/js/pages/graphql/tokens/Index.vue | 5 +- 5 files changed, 194 insertions(+), 197 deletions(-) diff --git a/resources/js/pages/graphql/Explore.vue b/resources/js/pages/graphql/Explore.vue index 2aa0d45a1d0..bf06953f41a 100644 --- a/resources/js/pages/graphql/Explore.vue +++ b/resources/js/pages/graphql/Explore.vue @@ -42,7 +42,7 @@ From e658e00be5621c4485965451c778071081e73b9e Mon Sep 17 00:00:00 2001 From: Brian Hanson Date: Mon, 21 Sep 2026 21:13:57 -0500 Subject: [PATCH 3/5] Add data-theme="light" styling --- packages/craftcms-ui/scripts/generate-color-palette.js | 5 ++++- packages/craftcms-ui/src/styles/shared/color-palette.css | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/craftcms-ui/scripts/generate-color-palette.js b/packages/craftcms-ui/scripts/generate-color-palette.js index bc4d280e3bc..96302675660 100644 --- a/packages/craftcms-ui/scripts/generate-color-palette.js +++ b/packages/craftcms-ui/scripts/generate-color-palette.js @@ -45,7 +45,10 @@ function printStyles() { ); lines.push(comment()); - lines.push('\n:root,\n:host {'); + // `[data-theme='light']` alongside the root, so a light subtree inside a dark + // one re-declares the palette. Without it only dark themes a subtree, and a + // light marker keeps inheriting whatever it sits in. + lines.push("\n:root,\n:host,\n[data-theme='light'] {"); lines.push(lightColors); lines.push(` /* Static colors */\n`); lines.push(staticColors); diff --git a/packages/craftcms-ui/src/styles/shared/color-palette.css b/packages/craftcms-ui/src/styles/shared/color-palette.css index 00f6a78f08c..54dafa4da2a 100644 --- a/packages/craftcms-ui/src/styles/shared/color-palette.css +++ b/packages/craftcms-ui/src/styles/shared/color-palette.css @@ -1,7 +1,8 @@ /* Auto-generated by scripts/generate-color-palette.js — do not edit manually */ :root, -:host { +:host, +[data-theme='light'] { --color-gray-50: #eaecef; --color-gray-100: #d4d7dd; --color-gray-200: #c2c6ce; From 36997e3d73283af1e65c450eca6bd2b2685b7cfd Mon Sep 17 00:00:00 2001 From: Brian Hanson Date: Tue, 22 Sep 2026 15:27:11 -0500 Subject: [PATCH 4/5] Height fixes --- resources/js/common/components/CpSidebar.vue | 1 + .../js/common/layouts/screens/PageScreen.vue | 25 ++++++++++++++++++- resources/js/common/layouts/screens/types.ts | 6 +++++ resources/js/pages/graphql/Explore.vue | 4 +-- 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/resources/js/common/components/CpSidebar.vue b/resources/js/common/components/CpSidebar.vue index b67b7603760..f827d02fcbd 100644 --- a/resources/js/common/components/CpSidebar.vue +++ b/resources/js/common/components/CpSidebar.vue @@ -110,6 +110,7 @@ .cp-sidebar[data-mode='docked'] { height: calc(100dvh - var(--cp-debug-bar-height, 0px)); + max-height: 100%; transform: none; position: sticky; inset-block-start: 0; diff --git a/resources/js/common/layouts/screens/PageScreen.vue b/resources/js/common/layouts/screens/PageScreen.vue index 4821f9b3b86..8d89b7247b3 100644 --- a/resources/js/common/layouts/screens/PageScreen.vue +++ b/resources/js/common/layouts/screens/PageScreen.vue @@ -59,6 +59,7 @@ const props = withDefaults(defineProps(), { defaultFormActions: () => ["saveAndContinueEditing"], formAdditionalButtons: () => [], contentMaxWidth: false, + fillViewport: false, }); const slots = defineSlots(); @@ -177,7 +178,7 @@ useActionRedirect();