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: form color #2278

Merged
merged 7 commits into from
Oct 9, 2023
Merged

Conversation

louismaximepiton
Copy link
Member

@louismaximepiton louismaximepiton commented Oct 3, 2023

Description

Form color in dark mode, by using existing and new Sass vars :

Sass var Previous value New value
$form-color-border-color - var(--#{$prefix}emphasis-color)
$form-color-hover-bg-color - var(--#{$prefix}emphasis-color)
$form-color-disabled-bg-color - $input-bg
$form-color-disabled-border-color $gray-500 var(--#{$prefix}disabled-color)
$form-color-disabled-background-swatch brightness(0) invert(1) brightness(.8) var(--#{$prefix}disabled-filter)

⚠️ In the same line as #2276, introduced a new CSS var: --bs-disabled-filter (associated to $disabled-filter and $disabled-filter-dark. It renders the same value as --bs-disabled-color). Use it on icons or whatever to have the same rendering.

Links

@louismaximepiton louismaximepiton added the color mode Temporary label to highlight color mode issues label Oct 3, 2023
@netlify
Copy link

netlify bot commented Oct 3, 2023

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit ab4ed83
🔍 Latest deploy log https://app.netlify.com/sites/boosted/deploys/6523afc693c1b400084973e3
😎 Deploy Preview https://deploy-preview-2278--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.

@louismaximepiton louismaximepiton marked this pull request as ready for review October 5, 2023 13:37
Copy link
Member

@hannahiss hannahiss left a comment

Choose a reason for hiding this comment

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

Juste 2 little observation:

  • Just to be sure, I supposed it is due to browser, but in Chrome we have a border #777 around the purple, and not in FF
  • In Chrome, when the page is globally in light mode, when opening the picker, it has contextually a dark or light bg, depending on the component's theme. But when the page is globally in dark mode, picker always sticks to dark background. (supposed its due to the browser's implementation :-) )

Otherwise it looks good! If you approve both observations, I think you can merge!

@louismaximepiton
Copy link
Member Author

louismaximepiton commented Oct 6, 2023

  • Just to be sure, I supposed it is due to browser, but in Chrome we have a border #777 around the purple, and not in FF

Good catch! it should have come from Bootstrap merge commits we must have missed it. I've added it with b19be8c.

  • In Chrome, when the page is globally in light mode, when opening the picker, it has contextually a dark or light bg, depending on the component's theme. But when the page is globally in dark mode, picker always sticks to dark background. (supposed its due to the browser's implementation :-) )

I wasn't aware of such a behavior. I think this should probably be tackled Bootstrap side with color-scheme: light; inside the :root, [data-bs-theme=light] selector. Any opinion on this ?

@julien-deramond julien-deramond self-requested a review October 9, 2023 07:54
@julien-deramond julien-deramond merged commit 322164c into main-jd-dark-mode Oct 9, 2023
13 checks passed
@julien-deramond julien-deramond deleted the main-lmp-form-color-dark branch October 9, 2023 07:54
@julien-deramond julien-deramond mentioned this pull request Oct 9, 2023
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
Projects
Development

Successfully merging this pull request may close these issues.

3 participants