dartdoc icon indicating copy to clipboard operation
dartdoc copied to clipboard

Dark mode tweaks

Open srawlins opened this issue 3 years ago • 6 comments

After trying out Dark mode locally, @mit-mit has some good suggestions:

  • [ ] the colors look a bit off compared to our standard colors on other sites; can we update the color palette to match?
  • [ ] the dark/light toggle takes up a lot of space. could it just be a single icon button that toggles between a filled sun and a hollow sun?

srawlins avatar Aug 10 '22 15:08 srawlins

@parlough do you have links for the color scheme of other Dart or Flutter properties for Dark mode?

srawlins avatar Aug 10 '22 15:08 srawlins

@klr981 What do you think of the single icon toggle idea? No rush to implement.

srawlins avatar Aug 10 '22 15:08 srawlins

@srawlins , @mit-mit, the colors were taken for the Dart pad palette.

keertip avatar Aug 10 '22 15:08 keertip

DartPad is currently the only other site with a proper dark mode: https://github.com/dart-lang/dart-pad/blob/master/lib/scss/colors.scss

Other than that, I'm not aware of any well-defined dark mode color scheme, but @johnpryan may have referenced one when working on the current DartPad design.

The homepage styles for dart.dev may be a useful reference as well: https://github.com/dart-lang/site-www/blob/main/src/_sass/_dash.scss

parlough avatar Aug 10 '22 16:08 parlough

The design resources recently moved over to Figma. I'll forward the link to this group.

johnpryan avatar Aug 10 '22 19:08 johnpryan

@srawlins , @mit-mit, the colors were taken for the Dart pad palette.

Alignment with DartPad sounds great, but there are a number of inconsistencies based on inspection of the current dartdoc and dartpad. Here's a few things I spotted:

  • General background (for both docs and code) is #0F161E but should be #10161E

  • Source code is in particular hard to read, with very low contrast between the dark background and the dark blue code font. Compare these two screenshots:

Screen Shot 2022-08-11 at 10 43 18 Screen Shot 2022-08-11 at 10 43 25

mit-mit avatar Aug 11 '22 08:08 mit-mit

@keertip @klr981 was my comment above useful to explain the issue i'm seeing?

mit-mit avatar Aug 18 '22 15:08 mit-mit

@keertip @klr981 was my comment above useful to explain the issue i'm seeing?

Yes! it was helpful, thank you for the feedback 😄. I am currently finishing some changes for the search and will address the colors for dark mode.

klr981 avatar Aug 18 '22 15:08 klr981

@mit-mit I am able to change the background color for the code and the docs.

For the code itself it can't be changed as easily to look like the second screenshot you sent. Since the docs only have some of the code parts specified, this will mean only some things can be changed to a specific color others things would have the same color even if it is not the same type.

klr981 avatar Aug 24 '22 17:08 klr981