Closed Bug 1422312 Opened 7 years ago Closed 2 years ago

Implement update media query from MQ4

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: florian, Assigned: autumn)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

The update media query from Media queries level 4 let people tell apart media that responsively update the screen, from those that cannot, or those that can but only slowly.

Authors can use that to style things differently on print vs ebook readers, even though both media are paginated. This kind of nuance was not possible to express just with @media print {...}

The specification is over here:
https://drafts.csswg.org/mediaqueries-4/#descdef-media-update

This should be marked as blocking https://bugzilla.mozilla.org/show_bug.cgi?id=1312621
Priority: -- → P1
Priority: P1 → P3

What's the sticking point for this feature? Deciding how to categorize platforms as "update: fast" and "update: slow"? Lack of interest?

If it's mostly a question of someone coming and writing the code (and docs? given the dev-doc-needed keyword), I'd be prepared to attempt it for my first contribution here.

Flags: needinfo?(emilio)

(In reply to autumn from comment #1)

What's the sticking point for this feature? Deciding how to categorize platforms as "update: fast" and "update: slow"? Lack of interest?

We work on what we consider more prioritary. P3 means "in the backlog of work".

If it's mostly a question of someone coming and writing the code (and docs? given the dev-doc-needed keyword), I'd be prepared to attempt it for my first contribution here.

That'd be great! I'd be happy to review a patch for this feature. It should be straight-forward to add. You need to add an entry here:

and for that to work you need to add the feature name (update) around here. Since this media query doesn't need dynamic change handling (presumably we want to match "none" for print documents, and "fast" elsewhere), the only missing piece would be to add tests.

You can extend layout/style/test/test_media_queries.html for that, and maybe a print reftest like this in somewhere like testing/web-platform/tests/css/printing:

<!doctype html>
<style>
  div { background: red; width: 100px; height: 100px; }
  @media (update: none) {
    div { background: green; }
  }
</style>
<div></div>
Flags: needinfo?(emilio)

Thanks a lot for the tips!! I'll get to work on this today.

Assignee: nobody → autumn
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/25541cc29e47
implement 'update' media feature r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/34065 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
Upstream PR merged by moz-wptsync-bot

Hi Dipika, https://developer.mozilla.org/en-US/docs/Web/CSS/@media/update-frequency shows "update" as experimental. I believe that's a mistake since it shipped in Fx102. Can you update the page? Thanks!

Flags: needinfo?(dbhattacharya)

Thanks for pointing it out, Maire. I'll update the page.

Update: Sorry, I was a bit hasty in my previous response. That status as Experimental on the page is correct. The reason why it is marked experimental is because it is not supported on any other major browser. You can see from the Browser compatibility table that it is only supported in Firefox. And thats why it gets marked as "Experimental" on MDN

Clearing needinfo

Flags: needinfo?(dbhattacharya)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: