Closed Bug 1396057 Opened 7 years ago Closed 7 years ago

stylo: Bring back calc support inside media queries

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox57 --- wontfix
firefox59 --- fixed

People

(Reporter: canova, Assigned: emilio)

References

Details

(Keywords: dev-doc-complete)

Attachments

(3 files)

This was implemented in stylo but not in gecko. We had to temporarily disable this just in case in Bug 1390339. We should bring this support back and ship that in the next release. See Bug 1390339 comment #10.

It's not blocking stylo.
Priority: -- → P4
I was dealing with bug 1408308 and it'd be nice to update media query parsing to the spec.
Assignee: nobody → emilio
(This is just the first step in updating to the spec, we should add support for proper expressions in another bug)
Comment on attachment 8927356 [details]
Bug 1396057: Fix indentation of the media query code.

Xidorn and Cam are on PTO. Manish, could you review this?
Attachment #8927356 - Flags: review?(xidorn+moz) → review?(manishearth)
Attachment #8927357 - Flags: review?(xidorn+moz) → review?(manishearth)
Attachment #8927358 - Flags: review?(xidorn+moz) → review?(manishearth)
Comment on attachment 8927356 [details]
Bug 1396057: Fix indentation of the media query code.

https://reviewboard.mozilla.org/r/198664/#review203960

I think this style change is very subjective, but whatever. The new style seems to be what rustfmt does so that seems ok.
Attachment #8927356 - Flags: review?(manishearth) → review+
Comment on attachment 8927357 [details]
Bug 1396057: Fix evaluation of rem inside media queries.

https://reviewboard.mozilla.org/r/198666/#review203962
Attachment #8927357 - Flags: review?(manishearth) → review+
Comment on attachment 8927358 [details]
Bug 1396057: Support calc() in media queries.

https://reviewboard.mozilla.org/r/198668/#review203964
Attachment #8927358 - Flags: review?(manishearth) → review+
Pushed by ecoal95@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/6bed71583aa9
Change tests of calc in media-queries so that the root element style has been resolved first. r=Manishearth
https://hg.mozilla.org/integration/autoland/rev/47752e9824da
Update test expectations. r=me
Does the web developer documentation need to be updated to account for these changes by any chance?
(In reply to Ryan Jones [:sciguyryan] from comment #13)
> Does the web developer documentation need to be updated to account for these
> changes by any chance?

Probably, yes.
Keywords: dev-doc-needed
Documented:

* Adding in note about it to browser compat data: https://github.com/mdn/browser-compat-data/pull/886
* Note in Fx59 rel notes: https://developer.mozilla.org/en-US/Firefox/Releases/59#CSS

Let me know if this looks OK. Thanks!
Flags: needinfo?(emilio)
I don't think it's worth mentioning that calc() in media queries was disabled on stylo, since stylo was never shipped before 57, and Gecko never supported it.

Other than that it looks good!
Flags: needinfo?(emilio)
(In reply to Emilio Cobos Álvarez [:emilio] from comment #19)
> I don't think it's worth mentioning that calc() in media queries was
> disabled on stylo, since stylo was never shipped before 57, and Gecko never
> supported it.
> 
> Other than that it looks good!

OK; I've simplified this note to just say it was adding in 59. The calc() compat data contains the exact info.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: