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

feat: dark mode #220

Merged
merged 4 commits into from
Apr 16, 2019
Merged

feat: dark mode #220

merged 4 commits into from
Apr 16, 2019

Conversation

allancorbett
Copy link
Collaborator

@allancorbett allancorbett commented Apr 10, 2019

BREAKING CHANGE: it could all go horribly wrong...

See https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme for more info.

Safari and FF67 support it at the moment with Chrome going to support it.

Screenshot 2019-04-10 at 10 15 42

Screenshot 2019-04-10 at 10 15 56

Things still needing done:

  • "What we do" images
  • General discussion about if we want to support this or not...

BREAKING CHANGE: it could all go horribly wrong
Copy link

@james-nash james-nash left a comment

Choose a reason for hiding this comment

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

These changes look fine to me. Nice one!

@james-nash
Copy link

james-nash commented Apr 11, 2019

Thanks for proposing & implementing this feature!

I think it's a good addition. It's something we were thinking of possibly doing in next via the new color system (see #147), but we never really thought about doing it for the current 1.x version. However, why not? Especially since you've pretty much done it already.

So, I propose:

  1. Polish this off and let's get it released
  2. We'll update the current Buildit website to use this (and figure out what to do about those "What we do" images* in the process)
  3. In next, once the new color system goes in, we'll retrofit an equivalent dark mode (should be pretty easy to implement)

@danbull @dw-buildit : What say ye?


*) Off the top of my head we could:

  • Inline those SVGs and set their fill to currentColor so they automagically adapt
  • Produce white versions of them and use a <picture> element to select the light or dark image based on the prefers-color-scheme media query.

@allancorbett
Copy link
Collaborator Author

allancorbett commented Apr 11, 2019

Inline those SVGs and set their fill to currentColor so they automagically adapt

That would be my preference.

I'm completely at sea as to how to actually implement it (in njks and json) though.

@allancorbett
Copy link
Collaborator Author

So I've implented the dark mode for certain images using some (probably rather ropey) methods: src/ui-lib/sass/05-components/01-atoms/04-media/_24-image.scss

Thoughts?

package.json Outdated Show resolved Hide resolved
@james-nash
Copy link

Looks good to me - just watch out with the package.json because it looks like it might overwrite the recent updates to that.

@james-nash
Copy link

This is lookin' good to me.

I'm happy for this PR to be un-drafted (is that the right term?) and merged.

I see you've already prepped some associated changes on the website, so let's get this released as soon as we can. :-)

@allancorbett allancorbett marked this pull request as ready for review April 16, 2019 09:51
@allancorbett allancorbett merged commit e283760 into develop Apr 16, 2019
@allancorbett allancorbett deleted the dark_mode branch April 16, 2019 09:55
@buildit-dev
Copy link

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@buildit-dev buildit-dev added the released STATUS: This change has been released. label Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released STATUS: This change has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants