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

audit: Omnibox matches brand colors #25

Closed
paulirish opened this issue Mar 17, 2016 · 7 comments · Fixed by #111
Closed

audit: Omnibox matches brand colors #25

paulirish opened this issue Mar 17, 2016 · 7 comments · Fixed by #111
Assignees

Comments

@paulirish
Copy link
Member

Manual evaluation: manifest has theme_color, <head> has <meta name="theme-color" content="_any valid CSS color_">

input:
audit:
  • parse manifest for theme_color.
  • Grab DOM and parse document.head for the theme-color meta.

Currently both are required. Chrome will be transitioning to use manifest theme-color by default: go/fizz-feature-backlog has a tracking item for this.

See also "PWA validator" bookmarklet - #17

Docs: Support for theme-color in Chrome 39 for Android, and whatwg/meta-theme-color: Spec for the theme-color meta extension

@paulirish
Copy link
Member Author

@brendankenny i think we have the pieces for this. can you hook them up to an aggregator so it gets surfaced?

@paulirish
Copy link
Member Author

I have a PR up that'll take care of this.

@paulirish
Copy link
Member Author

@mounirlamouri question that came up in #104.. what happens if color are specified in both meta and manifest and they differ?

@paulirish paulirish modified the milestones: PWA MVP, Lighthouse MVP Mar 30, 2016
@brendankenny brendankenny reopened this Mar 30, 2016
@mounirlamouri
Copy link

If theme_color is defined in the Manifest, it will be used as a default theme_color. Each page can then override it using the meta tag. Though, using the Manifest theme_color has the added benefit of being used for the splash screen.

@paulirish
Copy link
Member Author

Perfect. That's just what we needed to know. Thanks!

@brendankenny
Copy link
Member

I think I still don't understand the purpose of this audit. Maybe it's just that the title of this issue is throwing me off. What are brand colors? :)

Is the idea:

  • Chrome won't by default fetch the manifest, so <meta> theme-color is needed
  • When Chrome does fetch the manifest, it will use the manifest's theme_color for things like the splash screen, so you need it there too

but if the <meta> theme-color overrides the manifest theme_color, do you need a manifest one for the omnibox if you have a <meta> one? It seems like one or the other is sufficient, unless you want a splash screen color as well?

@brendankenny
Copy link
Member

Oh, I might be missing the other way. If you have a theme_color in your manifest, you need a <meta> theme-color in your page because we don't currently fetch the manifest on page load.

But it seems like if you have a <meta> theme-color, the manifest theme_color should be optional still?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants