Skip to content

[css-mediaqueries] Proposal: "prefers-reduced-data" #2370

@Malvoz

Description

@Malvoz

Would CSSWG consider this proposal of detecting exposing if the Save-Data request header from the Client Hint HTTP extension is on/off to allow for usage with CSS?

The Save-Data HTTP request header:

...a signal indicating explicit user opt-in into a reduced data usage mode on the client, and when communicated to origins allows them to deliver alternate content honoring such preference - e.g. smaller image and video resources, alternate markup...

- http://httpwg.org/http-extensions/client-hints.html#save-data

Example model

The 'prefers-reduced-data' feature:

Name: For: Value: Type:
prefers-reduced-data @media no-preference | reduce discrete

Example usage:

.image {
  background-image: url("image/heavy.jpg");
}

@media (prefers-reduced-data: reduce) { 
  /* Save-Data: On */
  .image {
    background-image: url("image/light.webp");
  }
}

Relevant articles, including use cases:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions