question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal: remove valid color checking from PWA requirements

See original GitHub issue

Summary

So after https://github.com/GoogleChrome/lighthouse/issues/3891#issuecomment-525929813 I went to update our cssstyle dependency to fix the rgba(0,0,0,0) bug, but then it turns out the new version that fixes that introduces several other bugs. The valid color checking has been a whack-a-mole problem for years and it feels not very useful so I was curious what it looks like on real sites.

According to July HTTPArchive data…

Only .08% of sites ever trigger our invalid color logic and of that set ~42% are actually valid colors that we incorrectly flag as invalid (see trix).

Proposal A: Change invalid color check to a warning on PWA themed-omnibox and splash-screen. It feels like this is a warning-level thing anyway and we’re almost wrong as often as we’re right.

Proposal B: Remove invalid color check entirely. 20KB for something useful to .05% of sites feels like a bit much, false warnings aren’t great either.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:23 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
patrickhulcecommented, Sep 15, 2020

We’ve decided to move forward with dropping the color checking here.

1reaction
connorjclarkcommented, Sep 3, 2019

We could close the gap between implementation and our color validation by not writing our own color validation (or rather, relying on cssstlye to be correct).

when the color is invalid, blink pushes an error to the parser: https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/manifest/manifest_parser.cc?l=164&rcl=65b3e11ce92ca41af626cb68ec84b795c90453ad

These end up as console errors: https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/manifest/manifest_manager.cc?l=194&rcl=ab4ecdb6a2dacf0a35344c2baa9509a9659eec86

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reconsider Web App Manifest "theme_color" requirement
Currently we require that you supply both the theme_color property in the manifest (the one you've linked) and the theme-color meta-tag.
Read more >
Web Application Manifest
[The feature] may be removed before advancement to Proposed Recommendation without a requirement to publish a new Candidate Recommendation.
Read more >
Customize the window controls overlay of your PWA's title bar
With the Window Controls Overlay feature, developers can customize the title bar of installed PWAs so that their PWAs feel more like apps....
Read more >
Meta Theme Color and Trickery
I've created a demo page for testing dark mode that includes the meta tags above and also allows you to install the site...
Read more >
PWAs Turn Websites Into Apps: Here's How
If you want to uninstall the PWA, you can do so from the Start Menu's right-click menu, from Windows' Apps and Features Setting...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found