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

Add dark mode #471

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Add dark mode #471

wants to merge 3 commits into from

Conversation

josephfrazier
Copy link
Owner

See https://reportedcab.slack.com/archives/C9VNM3DL4/p1692087071429079:

Have we ever considered supporting dark mode? Sometimes I’m filing complaints late at night and I wish

I'm curious, do you know if your browser automatically indicates a
preference for dark mode at night? I'm asking because the webapp uses a
pretty simple css framework, and I've found a similar one that will
automatically use dark mode if preferred by the browser, so I'm hoping I
could just drop that in and not have to add in other code to support
switching between the two

Yeah I’m pretty sure Safari on iOS just auto switches if it’s available!


Commits at PR open:

  • yarn add simpledotcss

  • XXX DOES NOT WORK: Home.js: Use simpledotcss instead of marx-css

    I get this error when I open localhost:3000

    SyntaxError

    /Users/josephfrazier/workspace/reported-web/node_modules/simpledotcss/simple.css:2
    :root,
    ^
    
    SyntaxError: Unexpected token ':'
        at Object.compileFunction (node:vm:360:18)
        at wrapSafe (node:internal/modules/cjs/loader:1088:15)
        at Module._compile (node:internal/modules/cjs/loader:1123:27)
        at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
        at Object.newLoader [as .js] (/Users/josephfrazier/workspace/reported-web/node_modules/pirates/lib/index.js:104:7)
        at Module.load (node:internal/modules/cjs/loader:1037:32)
        at Function.Module._load (node:internal/modules/cjs/loader:878:12)
        at Module.require (node:internal/modules/cjs/loader:1061:19)
        at require (node:internal/modules/cjs/helpers:103:18)
        at Object.simpledotcss (/Users/josephfrazier/workspace/reported-web/external commonjs "simpledotcss":1:1)
    

I get this error when I open localhost:3000

> # SyntaxError
>
> ```
> /Users/josephfrazier/workspace/reported-web/node_modules/simpledotcss/simple.css:2
> :root,
> ^
>
> SyntaxError: Unexpected token ':'
>     at Object.compileFunction (node:vm:360:18)
>     at wrapSafe (node:internal/modules/cjs/loader:1088:15)
>     at Module._compile (node:internal/modules/cjs/loader:1123:27)
>     at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
>     at Object.newLoader [as .js] (/Users/josephfrazier/workspace/reported-web/node_modules/pirates/lib/index.js:104:7)
>     at Module.load (node:internal/modules/cjs/loader:1037:32)
>     at Function.Module._load (node:internal/modules/cjs/loader:878:12)
>     at Module.require (node:internal/modules/cjs/loader:1061:19)
>     at require (node:internal/modules/cjs/helpers:103:18)
>     at Object.simpledotcss (/Users/josephfrazier/workspace/reported-web/external commonjs "simpledotcss":1:1)
> ```
@josephfrazier josephfrazier temporarily deployed to reported-web-dark-mode-xxhin4o September 3, 2023 23:29 Inactive
@josephfrazier josephfrazier self-assigned this Sep 3, 2023
@josephfrazier josephfrazier temporarily deployed to reported-web-dark-mode-e1xmmxs September 4, 2023 01:39 Inactive
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.

1 participant