Skip to content

@angular/pwa: Consider necessity of defaulting to the specific theme-color #1976d2 #30336

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

Closed
Yves-X opened this issue May 17, 2025 · 0 comments · Fixed by #30339
Closed

@angular/pwa: Consider necessity of defaulting to the specific theme-color #1976d2 #30336

Yves-X opened this issue May 17, 2025 · 0 comments · Fixed by #30339
Labels
area: @angular/pwa freq1: low Only reported by a handful of users who observe it rarely severity1: confusing type: bug/fix

Comments

@Yves-X
Copy link

Yves-X commented May 17, 2025

Command

add

Description

When running ng add @angular/pwa to set up the Angular service worker, Angular CLI automatically adds a <meta name="theme-color" content="#1976d2"> tag to index.html.

The choice of this specific color (#1976d2) seems pointless. Is there a particular reason for this default?

Additionally, this behavior feels inconsistent with Angular CLI's typical approach of generating neutral templates. For instance, the CLI doesn't set a default lang attribute in HTML and expect developers to modify it; instead, it leaves this tag unset by default.

Describe the solution you'd like

I’d suggest one of the following:

  • Remove the default <meta name="theme-color"> from the schematic.
  • Replace the color with a neutral default.
  • Make the additional option via a prompt when running ng add @angular/pwa.

Describe alternatives you've considered

Developers can manually change or remove the tag when reviewing changes or after noticing unexpected UI coloring.
However, since theme-color affects the browser UI rather than visible page elements, it can be difficult for less experienced developers to pick the color and trace its source.

@alan-agius4 alan-agius4 added type: bug/fix freq1: low Only reported by a handful of users who observe it rarely severity1: confusing area: @angular/pwa labels May 19, 2025
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue May 19, 2025
These properties are unnecessary and create additional maintenance overhead for developers.

Closes: angular#30336
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue May 19, 2025
…anifest

These properties are unnecessary and create additional maintenance overhead for developers.

Closes: angular#30336
alan-agius4 added a commit that referenced this issue May 19, 2025
…anifest

These properties are unnecessary and create additional maintenance overhead for developers.

Closes: #30336
alan-agius4 added a commit that referenced this issue May 19, 2025
…anifest

These properties are unnecessary and create additional maintenance overhead for developers.

Closes: #30336
(cherry picked from commit 7a21deb)
alan-agius4 added a commit that referenced this issue May 19, 2025
…anifest

These properties are unnecessary and create additional maintenance overhead for developers.

Closes: #30336
(cherry picked from commit 7a21deb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: @angular/pwa freq1: low Only reported by a handful of users who observe it rarely severity1: confusing type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants