Skip to content

Commit

Permalink
Re-add as a valid value to applicable preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewarlow committed Feb 8, 2024
1 parent 1526f76 commit 272f96d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.bs
Expand Up @@ -107,6 +107,7 @@ This is modeled after the `prefers-contrast` user preference media feature as de
1. Let |validValues| be a new empty [=sequence=].
1. Add `"more"` to |validValues|.
1. Add `"less"` to |validValues|.
1. Add `"no-preference"` to |validValues|.
1. Return |validValues|.
</div>

Expand All @@ -128,6 +129,7 @@ This is modeled after the `prefers-reduced-motion` user preference media feature

1. Let |validValues| be a new empty [=sequence=].
1. Add `"reduce"` to |validValues|.
1. Add `"no-preference"` to |validValues|.
1. Return |validValues|.
</div>

Expand All @@ -149,6 +151,7 @@ This is modeled after the `prefers-reduced-transparency` user preference media f

1. Let |validValues| be a new empty [=sequence=].
1. Add `"reduce"` to |validValues|.
1. Add `"no-preference"` to |validValues|.
1. Return |validValues|.
</div>

Expand All @@ -168,6 +171,7 @@ This is modeled after the `prefers-reduced-data` user preference media feature a

1. Let |validValues| be a new empty [=sequence=].
1. Add `"reduce"` to |validValues|.
1. Add `"no-preference"` to |validValues|.
1. Return |validValues|.
</div>

Expand Down Expand Up @@ -232,10 +236,6 @@ interface PreferenceObject : EventTarget {
1. Return |validValues|.
</div>

Note: "no-preference" is deliberately not an allowed value for any preference.
This is to mitigate the risk of sites misusing the API to the detriment of user experience.
Authors should instead clear the preference override. See [#30](https://github.com/WICG/web-preferences-api/issues/30) for more details.

### {{onchange}} event handler attribute ### {#onchange-attribute}

The <dfn attribute for=PreferenceObject>onchange</dfn> attribute is an [=event handler IDL attribute=] for
Expand Down

0 comments on commit 272f96d

Please sign in to comment.