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

Clarify off-scope theme color #879

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 11 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,12 @@ <h2>
at least its <a>origin</a>, including whether it is served over a
secure connection. This UI SHOULD differ from any UI used when the
[=Document/URL=] is <a>within scope</a>, in order to make it obvious
that the user is navigating off scope.
that the user is navigating off scope. In addition, the user agent
SHOULD reset the <a>application context</a>'s <a>default theme
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the term "reset" or "default theme color", since it implies making a permanent change to the default theme color itself. Rather, could it just say "SHOULD ignore the application's default theme color, instead using the theme color of the current document". (This could be more formal, but that's the idea.)

color</a> to a user agent-defined default value. The off-scope document
may override that color through the inclusion of a valid [[HTML]]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't use the word "may" without it being in all-caps, making it a normative requirement. And you can't impose a normative requirement on the document; all requirements are imposed on the user agent.

"The user agent MAY use the HTML meta element whose name attribute is "theme-color" of the off-scope document to theme the application context."

<code>meta</code> element whose <code>name</code> attribute is
"theme-color".
</p>
<div class="note">
<p>
Expand Down Expand Up @@ -1672,11 +1677,11 @@ <h3>
<p>
If the user agent honors the value of the <code>theme_color</code>
member as the <a>default theme color</a>, then that color serves as
the <a>theme color</a> for all browsing contexts to which the
manifest is <a>applied</a>. However, a document may override the
<a>default theme color</a> through the inclusion of a valid [[HTML]]
<code>meta</code> element whose <code>name</code> attribute is
"theme-color".
the <a>theme color</a> for all browsing contexts <a data-lt=
"within-scope-manifest">within scope</a> to which the manifest is
<a>applied</a>. However, a document may override the <a>default theme
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should that be MAY @marcoscaceres ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I wrote on the other review comment: you can't use the word "may" without it being in all-caps, making it a normative requirement. And you can't impose a normative requirement on the document; all requirements are imposed on the user agent.

(I know this is a problem with the existing text as well. We should fix it.)

color</a> through the inclusion of a valid [[HTML]] <code>meta</code>
element whose <code>name</code> attribute is "theme-color".
</p>
<p>
The steps for <dfn>processing the <code>theme_color</code>
Expand Down