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

Handle custom selectors in dark mode query re #11624 #11671

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

jacobtylerwalls
Copy link
Member

Follow-up to #11667, see suggestion to liberalize this. Agree we should avoid hard-coding the selector.

@@ -40,8 +40,19 @@ export default async function createVueApplication(vueComponent, themeConfigurat
});

const app = createApp(vueComponent);
const darkModeClass = themeConfiguration.theme.options.darkModeSelector.substring(1);
const darkModeStorageKey = `arches.${darkModeClass}`;
Copy link
Member Author

Choose a reason for hiding this comment

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

This will create a local storage key arches.arches-dark, which is good in case we end up with arches.my-not-namespaced-dark-selector?

Copy link
Contributor

@chrabyrd chrabyrd left a comment

Choose a reason for hiding this comment

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

let's go 🪨 🇮🇹 !

@jacobtylerwalls jacobtylerwalls merged commit 1a90bdc into dev/8.0.x Dec 3, 2024
7 checks passed
@jacobtylerwalls jacobtylerwalls deleted the jtw/dark-mode-follow-up branch December 3, 2024 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants