Skip to content

Default tab bar theme mixes light and dark backgrounds (interferes with some responsive favicons) #387

@kaelig

Description

@kaelig

The default theme (in light mode) shows tabs with a mix of light and dark backgrounds. This interferes with responsive favicons built to respond to light/dark mode and expect a consistent lightness for tab backgrounds.

Light mode

As seen below, dark monochrome icons such as the GitHub favicon and the square one I've created for the example (both responsive), don't contrast well on a dark background.

  • active tab: light background
  • inactive tab: dark background

Screen Shot 2020-05-07 at 10 59 40 AM

Dark mode

All tabs are dark, allowing responsive icons to contrast well in both active and inactive tabs.

Screen Shot 2020-05-07 at 11 02 35 AM

Light mode with light theme

The light theme brings us very close to what I would expect (high contrast and similar backgrounds across tabs):

Screen Shot 2020-05-07 at 11 08 01 AM


Code to reproduce:

index.html

<!DOCTYPE html>
<title>Responsive favicon</title>
<link rel="icon" href="favicon.svg" />

favicon.svg

<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
  <style>
    rect {
      fill: black;
    }
    @media (prefers-color-scheme: dark) {
      rect {
        fill: white;
      }
    }
  </style>
  <rect width="32" height="32" />
</svg>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions