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

🟡 ⚫ Boosted dark mode prototype #1858

Merged
merged 6 commits into from
Mar 20, 2023
Merged

Conversation

julien-deramond
Copy link
Member

@julien-deramond julien-deramond commented Feb 24, 2023

This PR is a prototype to play with the first set of colors provided by the designers to define the dark mode for Boosted.
However, IMO it can be merged as-is since our current dark mode version is based on Bootstrap (their colors) and is broken in our environment, and hurt my eyes everyday 😄

In light mode, we have components and their dark variants.
In dark mode, the light and dark variants are displayed the same way (with a black background)

Some rules for dark mode:

  • Black background : #000000
  • Default body text color: #eeeeee
  • For the components, the text color must remain the same as for the dark variants, so in most cases: #ffffff

For the moment, all this behavior is not developed. Here is the list of things tried:

  • Themes colors (primary, secondary, info, warning, danger) have the same values as in light mode
  • Body text color (default text color in a page) is set to $body-color-dark: #eee
  • Default background color is set to $body-bg-dark: #000
  • Tertiary background color is set arbitrarily to $body-tertiary-bg-dark: #414141
    • Some fixes have been done in the documentation to avoid having white background, so I replaced bg-white by bg-tertiary-bg

Live preview

@netlify
Copy link

netlify bot commented Feb 24, 2023

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit 2f36f6e
🔍 Latest deploy log https://app.netlify.com/sites/boosted/deploys/64181d032958750008aa07d7
😎 Deploy Preview https://deploy-preview-1858--boosted.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@julien-deramond julien-deramond force-pushed the main-jd-boosted-dark-mode branch 2 times, most recently from f046984 to acbbdc0 Compare March 15, 2023 06:48
@julien-deramond julien-deramond marked this pull request as ready for review March 15, 2023 06:51
Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

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

Quick wins:

  • Set the .highlight-toolbar bg to var(--bs-tertiary-bg)
  • Set the tables bg to transparent or null
  • Set $link-color-dark: $white or currentColor or $gray-300 and $link-hover-color-dark: $primary
  • Card example may have a bg-white on the first part ?
  • .ods-guidelines may use var(--bs-tertiary-bg) as a background.

Components that don't fill the minimum requirements:

  • Breadcrumbs (divider and text)
  • Cards: .card-header/footer text color
  • Close buttons (cross is not visible), maybe a currentColor well placed may do the trick
  • Form elements are barely detectable
  • Popovers but might be better with the incoming PR
  • Stickers
  • Tags: some tag icons (mainly the first one)
  • Toasts
  • Link with chevron
  • Focus
  • Quantity selector
  • Code blocks
  • Tables: caption, background, ...

Misc

Many of them are broken on some variants but let's tackle this later (Dropdown hover, disabled states, code previews, etc...)

scss/_variables-dark.scss Show resolved Hide resolved
scss/_variables-dark.scss Show resolved Hide resolved
Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

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

Tried to tackle the things that were not hard to change inside this PR, it's up to you if find it fine or not !

Copy link
Member Author

@julien-deramond julien-deramond left a comment

Choose a reason for hiding this comment

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

@louismaximepiton Few comments to tackle together. But thanks for these modifications :)

scss/_variables-dark.scss Show resolved Hide resolved
scss/_variables.scss Show resolved Hide resolved
site/assets/scss/_boosted.scss Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Mar 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@julien-deramond julien-deramond merged commit cfbbf3a into main Mar 20, 2023
@julien-deramond julien-deramond deleted the main-jd-boosted-dark-mode branch March 20, 2023 10:26
@louismaximepiton louismaximepiton mentioned this pull request Mar 27, 2023
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants