Jump to content
View in the app

A better way to browse. Learn more.

Invision Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Best practices to design for light and dark mode?

Featured Replies

I'm not sure what the best way is to design pages (Pages app) so they look good in light and dark mode.

I found out that I can target dark mode with CSS by adding html[data-ips-scheme-active="dark"] to my CSS selector, for example:

html[data-ips-scheme-active="dark"] .column {
  background-color: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

Is that the proper way to do it or is there a better way?

For example if I want a specific background or text color in a certain section of the page, do I have to declare two colors, one by default (for the light mode) and one with html[data-ips-scheme-active="dark"] (for the dark mode)?

Or are there variables I can use that automatically switch between light and dark modes?

Are there some resources on this topic? Thank you!

That is the correct way in which to do it. We dont have any documentation on that currently, but this is what you are looking for

[data-ips-scheme="light"] {
    SOMETHINGCSS-Y;
}
[data-ips-scheme="dark"] {
    SOMETHINGCSS-Y;
}
  • Author

Great! Thank you Marc.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.