Skip to content

@PWA themeColor should not affect apple-mobile-web-app-status-bar-style #5576

@jouni

Description

@jouni

The only supported values for the apple-mobile-web-app-status-bar-style meta tag are default, black and black-translucent.

From Apple’s documentation:

apple-mobile-web-app-status-bar-style
Sets the style of the status bar for a web application.

This meta tag has no effect unless you first specify full-screen mode as described in apple-apple-mobile-web-app-capable.
If content is set to default, the status bar appears normal. If set to black, the status bar has a black background. If set to black-translucent, the status bar is black and translucent. If set to default or black, the web content is displayed below the status bar. If set to black-translucent, the web content is displayed on the entire screen, partially obscured by the status bar. The default value is default.

The @PWA annotation affects the value of the meta tag here:

head.appendElement(META_TAG)
.attr("name", "apple-mobile-web-app-status-bar-style")
.attr(CONTENT_ATTRIBUTE, config.getThemeColor());

It is not possible to override this by using a PageConfigurator as the meta tags produced by it are added to the DOM before the ones added by the @PWA annotation.

The safest option is to not set the value of this meta tag at all, and leave it up to the developer. But, we could extend the capabilities of the @PWA annotation to be able to easily choose the desired value. Not sure if there’s something similar for Android, and if we should come up with an abstraction to cover both platforms.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions