Skip to content

Conversation

@aaronshekey
Copy link
Contributor

@aaronshekey aaronshekey commented Jul 26, 2019

This PR explores some of the ideas discussed in #297.

A note for Stack Overflow users: This does not mean we're shipping dark mode. This PR is an exploration only.

Screen Shot 2020-01-13 at 9 22 19 PM

  • Generate light and dark-specific color scales
  • Implement each color as a native CSS variable
  • Refactor buttons to rely on native CSS variables
  • Build dark mode conditional atomic override classes
  • Figure out how to handle focus states
  • Figure out how to handle drop shadows
  • Fix notice code-coloring
  • Fix button group badge markup
  • Fix links component
  • Style modals appropriately
  • Fix badge progress bar presentation in dark mode
  • Style sidebar widgets appropriately
  • Style tags appropriately
  • Replace documentation border colors with more neutral treatment
  • Delete Less @variable color variables
  • Document dark mode override classes
  • Figure out production variables strategy
  • Figure out why some icons look bad in dark mode
  • Update colors documentation to be completely accurate
  • Make the scrollbar mixin darkmode-aware.

@aaronshekey aaronshekey added the exploration An exploration without intent to ship... immediately label Jul 26, 2019
@StackExchange StackExchange deleted a comment from stacks-bot Oct 3, 2019
Copy link
Contributor

@TedGoas TedGoas left a comment

Choose a reason for hiding this comment

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

Thanks for the walk-through, very helpful. This looks good to go for Stacks, though you're much closer to this than I.

Copy link
Contributor

@b-kelly b-kelly left a comment

Choose a reason for hiding this comment

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

lgtm! Awesome work on this. Just added some notes where there will be non-dark mode related breaking changes. I don't think there needs to be any action on these, it's just for keeping track for future documentation / release notes.


// $ BADGES
// ----------------------------------------------------------------------------
@badge-gold: #ffcc01;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a breaking change. Double check instances of this before updating any clients

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll make sure this rename goes into the production PR.

&::-ms-clear { display: none; }

// -- STYLE SCROLLBARS
@scrollbar-styles();
Copy link
Contributor

Choose a reason for hiding this comment

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

This is potentially a breaking change too. Should see how this looks on scrollable inputs before merge.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checked ✌️

--bronze-bg: @bronze-bg;
--bronze-border: @bronze-border;
// Gold
--gold: @gold;
Copy link
Contributor

Choose a reason for hiding this comment

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

Potential breaking change, but I doubt anyone is using our css variables in any capacity, much less these badge variables.

@brc-orange: @orange-400;
// -- Dark mode
.dark-colors() {
--white: #2d2d2d;
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like we're not really caring to expose these colors as variables (eg @dark-black-025)? I think overall this is the right choice, since we want our users to ultimately consume these colors as var(--black-025) anyways and exposing as less variables would be time consuming and make migration harder in the future.

- variable: "@bs-lg"
default: "0 @su4 @su12 fade(@black-800, 20%)"
description:
- variable: "@bs-i-sm"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing these is also a breaking change, but these classes aren't used anywhere in production.

@aaronshekey aaronshekey merged commit a639107 into develop Jan 14, 2020
@aaronshekey aaronshekey deleted the feature/dark-mode branch January 14, 2020 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exploration An exploration without intent to ship... immediately

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants