Skip to content

Enable Dark Mode #11

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

Merged
merged 3 commits into from
Jan 18, 2021
Merged

Enable Dark Mode #11

merged 3 commits into from
Jan 18, 2021

Conversation

joshmgross
Copy link
Contributor

@joshmgross joshmgross commented Jan 17, 2021

Closes #10

This pull request adds a configuration file to enable dark mode with the media setting and regenerates app/assets/stylesheets/tailwind.css

Since this configuration file is in the default location, the -c option isn't need for tailwindcss-cli.

This change nearly doubles the size of app/assets/stylesheets/tailwind.css, but the purging of unused classes should help with the extra bloat.

@MikeRogers0
Copy link
Contributor

MikeRogers0 commented Jan 17, 2021

@joshmgross That's a lot of config in tailwind.config.js 😱

I just locally tried setting my tailwind.config.js to be:

module.exports = {
  darkMode: 'media',
}

The ran npx tailwindcss-cli@latest build -o app/assets/stylesheets/tailwind.css - That added the dark mode CSS Classes. What do you think? :)

@joshmgross
Copy link
Contributor Author

Thanks @MikeRogers0, I didn't realize the rest could be left out 😄

@dhh dhh merged commit 16aed84 into rails:main Jan 18, 2021
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.

Include Dark mode styles
3 participants