Swift.org in dark mode

We’re excited to announce support for dark mode! For those of you using dark mode on your OS, Swift.org will automatically adapt to match. Or if you’d like to view the site in a specific light or dark mode, you can select your preference and the setting will persist across sessions. The majority of Swift.org has this new support as of today, and we'll be adding support for more sections across the site over time.

44 Likes

This is really nice!! Thanks a lot for the improvement.

That said, the dark mode doesn't seem to trigger on iOS if you pin the site on the home screen. Works fine from normal Safari access, though. :thinking: Removing the site and pinning it again works. So it probably has something to do with cache.

1 Like

It seems like there were other styling changes as well, as the page now isn't centered or width limited, leading some pages to have two different widths of content. For example:

3 Likes

Bravo~
I don't need "Dark Reader" extension anymore. Thx!

1 Like

Unfortunately this doesn't seem to apply to the Swift book: About Swift — The Swift Programming Language (Swift 5.5)

4 Likes

Correct, the Swift book still needs some work to adopt dark mode. That's on the agenda to get working.

9 Likes

Thank you! Would it be possible to use these forums' palette as a reference? Having #fff colored text over a #000 background kind of hurts the eyes (at least for me, I may be the only one).

6 Likes

Very nice! Are there currently plans to add dark mode to the forums and the forum summary email newsletter?

1 Like

The forums are in dark mode for me. I can't remember setting it but it's in the preferences, under "Interface".

1 Like

Yeah that was it. In the top-right, click Profile picture, in the popover activate last tab, in the left nav click Interface, then on the right you can set Theme to Dark.

Would be nice if the forum also adapts to match system's setting.

10 Likes

soliloquy :thought_balloon:
I wish Jenkins were also in dark mode...

Can the Swift logo in README.md also be updated for dark mode?

I tried the following:

<picture>
  <source srcset="https://swift.org/assets/images/swift~dark.svg" media="(prefers-color-scheme: dark)">
  <img src="https://swift.org/assets/images/swift.svg" alt="Swift logo" height="70">
</picture>

# Swift Programming Language

But it seems like the picture element isn't allowed by GitHub's Markdown.

1 Like
Terms of Service

Privacy Policy

Cookie Policy