Giter Club home page Giter Club logo

Comments (8)

mrmartineau avatar mrmartineau commented on June 30, 2024

Hey @timrossback, thanks for raising the issue. This functionality is extremely easy to add since this theme already uses Theme UI for this.

I don't have much time to make this fix so would you be able to tackle it?

from gatsby-theme-code-notes.

 avatar commented on June 30, 2024

I'd be happy to maybe give it a crack @mrmartineau, but I'm really not too familiar with Gatsby or React. I'll see what I can do though.

from gatsby-theme-code-notes.

mrmartineau avatar mrmartineau commented on June 30, 2024

It should only be a one line change in the index.js file within the gatsby-plugin-theme-ui directory. See here for the docs: https://theme-ui.com/color-modes#initialize-mode-with-prefers-color-scheme-media-query

from gatsby-theme-code-notes.

 avatar commented on June 30, 2024

Yeah, I have absolutely no idea how to do this 😆 Sorry! I was looking through the index.js file, and I just simply don't know enough about how this theme and Theme-UI works hahahaha.

From my abstraction, I think useColorSchemeMediaQuery: true, just needs to be added before the export default colours line or possibly at the very end for maintainability, but since I'm unable to test it locally (good ole' Windows), I really wouldn't feel confident putting forward a PR. Sorry!

Might be one for someone else who is more active with JavaScript, Gatsby and Reach to grab.

from gatsby-theme-code-notes.

mrmartineau avatar mrmartineau commented on June 30, 2024

Hey @timrossback, that is exactly how I'd do it as well. No worries, I'll see if I can make this change over the next few days.

from gatsby-theme-code-notes.

mrmartineau avatar mrmartineau commented on June 30, 2024

@timrossback I have done this now and it will ready in the next release.

from gatsby-theme-code-notes.

 avatar commented on June 30, 2024

Great, thank you so much, and I'm so sorry I couldn't be more help!

from gatsby-theme-code-notes.

mrmartineau avatar mrmartineau commented on June 30, 2024

hey @timrossback, version 1.15.0 has been released with this feature, please update and check it out.

If you're interested to learn how I did it, this commit made the change: 29f80af

from gatsby-theme-code-notes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.