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

Dark mode: Add $theme-colors-dark and $theme-colors-rgb-dark #2227

Merged
merged 13 commits into from
Sep 20, 2023

Conversation

louismaximepiton
Copy link
Member

@louismaximepiton louismaximepiton commented Sep 11, 2023

Description

Description of the main branch once merged:

Palette:

Variable to use 🎨 Light mode hex Dark mode hex
--bs-body-bg #ffffff #141414
--bs-body-color #000000 #eeeeee
--bs-highlight-bg #000000 #ffffff
--bs-highlight-color #ffffff #000000
--bs-secondary-bg #eeeeee #333333
--bs-border-color-translucent #cccccc #666666
--bs-secondary-color #666666 #cccccc
--bs-link-hover-color #f16e00 #ff7900
--bs-primary #ff7900 #ff7900
--bs-success #228722 #32c832
--bs-info #4170d8 #527edb
--bs-warning #ffcc00 #ffcc00
--bs-danger #cd3c14 #d53f15

If there's a new color that doesn't fit well in this table and none exist in actual, introduce a new one otherwise, update this description.

Tasks

  • Display theme-colors-dark-map in the documentation (and theme-colors-rgb-dark?) where theme-colors-map is displayed Should be fine
  • Do we provide something to explain how to override $theme-colors-dark in Boosted only (doesn't exist in Bootstrap) Should be fine
  • In docs/5.3/utilities/background/, it shows that we need to add a new text utility: white in light mode, black in dark mode.
  • Does bg-primary need to switch between oranges in light and dark mode?
  • Does bg-dark need to be #141414? And in light mode which color? (see site/data/theme-colors.yml and contrast_color)
  • Refactoring of https://boosted.netlify.app/docs/5.3/utilities/colors/#oranges-colors so that it works in light/dark mode
  • https://deploy-preview-2227--boosted.netlify.app/docs/5.3/customize/color/#oranges-colors switch light/dark mode or always display the 2 palettes?
  • Check $body-secondary-color-dark impacts in terms of usage Should be fine
  • Check $body-secondary-bg-dark impacts in terms of usage Should be fine
  • Check $body-tertiary-color-dark impacts in terms of usage Not quite sure, need further investigation
  • Check $body-tertiary-bg-dark impacts in terms of usage Should be fine

Types of change

  • New feature (non-breaking change which adds functionality)

Live previews

@louismaximepiton louismaximepiton added v5 css color mode Temporary label to highlight color mode issues labels Sep 11, 2023
@netlify
Copy link

netlify bot commented Sep 11, 2023

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit f484904
🔍 Latest deploy log https://app.netlify.com/sites/boosted/deploys/650a9a8b81f19f0008a301d9
😎 Deploy Preview https://deploy-preview-2227--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 configuration.

scss/_variables.scss Outdated Show resolved Hide resolved
scss/_maps.scss Outdated Show resolved Hide resolved
@louismaximepiton
Copy link
Member Author

TBH, not quite sure about the changes in the doc. maybe these should come later. Haven't changed the migration guide as weel for now since the variables might change.

@julien-deramond julien-deramond changed the title Dark mode: Add some abstract tokens Dark mode: Add $theme-colors-dark and $theme-colors-rgb-dark Sep 12, 2023
@louismaximepiton louismaximepiton marked this pull request as ready for review September 12, 2023 11:56
Copy link
Contributor

@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.

Few quick comments

scss/_maps.scss Outdated Show resolved Hide resolved
scss/_maps.scss Outdated Show resolved Hide resolved
scss/_root.scss Show resolved Hide resolved
@julien-deramond julien-deramond force-pushed the main-jd-dark-mode-tokens branch 3 times, most recently from 21eba76 to 8fce157 Compare September 19, 2023 13:42
// scss-docs-start theme-color-dark-variables
$primary-dark: $orange !default;
$secondary-dark: $black !default;
$success-dark: $functional-green-dark !default;
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we need to override $blue, $green, etc. + $colors or create *-dark versions of them?

In light mode we have:

$functional-green:  #228722 !default;
$green: $functional-green !default;
$success: $green !default;

In dark mode:

$functional-green-dark:  #228722 !default;
$success: $functional-green-dark !default;

@julien-deramond julien-deramond merged commit 13673d4 into main-jd-dark-mode Sep 20, 2023
@julien-deramond julien-deramond deleted the main-jd-dark-mode-tokens branch September 20, 2023 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
color mode Temporary label to highlight color mode issues css v5
Projects
Development

Successfully merging this pull request may close these issues.

2 participants