color-scheme: dark light; and user enabled theme change with JS
Hi, I want to ask what the best way to do the following is:
1. I want to use ,
2. have JS recognize which scheme the user has enabled
3. based on which scheme the user has, a button would be used to change to the opposite theme.
4. I do not want to additionally define what dark/light theme would be like, like we would usually do without color-scheme in CSS.
so I have this code
ChatGPT says I should have additionally defined what dark/light theme would be like, like we would usually do without color-scheme in CSS - which I do not want.
so with JS , I would detect their scheme and change the theme, but now it is made by calling to "data-theme" (which I don't know what it is) and calling on the additionally CSS definitions of dark and light (which I do not want to use).
1. I want to use ,
2. have JS recognize which scheme the user has enabled
3. based on which scheme the user has, a button would be used to change to the opposite theme.
4. I do not want to additionally define what dark/light theme would be like, like we would usually do without color-scheme in CSS.
so I have this code
ChatGPT says I should have additionally defined what dark/light theme would be like, like we would usually do without color-scheme in CSS - which I do not want.
so with JS , I would detect their scheme and change the theme, but now it is made by calling to "data-theme" (which I don't know what it is) and calling on the additionally CSS definitions of dark and light (which I do not want to use).
