PreferenceManager: reducedTransparency property
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The reducedTransparency read-only property of the PreferenceManager interface returns the PreferenceObject used to override the user's preference for the reduced transparency of the site.
Valid reducedTransparency PreferenceObject.value settings are reduce and no-preference.
Value
A PreferenceObject used to override the user's preference for the reduced transparency of the site.
Examples
Basic usage
This example demonstrates how to query the user's reduced transparency preference.
if (navigator.preferences.reducedTransparency.value === "reduce") {
// The user prefers reduced transparency.
} else {
// The user has stated no preference regarding transparency.
}
Specifications
| Specification |
|---|
| Media Queries Level 5 # reduced-transparency-attribute |
Browser compatibility
| desktop | mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
reducedTransparency
|
|
|
|
|
|
|
|
|
|
|
|
|
Legend
Tip: you can click/tap on a cell for more information.
- In development. Supported in a pre-release version.
- In development. Supported in a pre-release version.
- No support
- No support
- Experimental. Expect behavior to change in the future.