Closed
Bug 1304014
Opened 9 years ago
Closed 7 years ago
calc() values for font-size don't work in shorthand
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| firefox-esr52 | --- | wontfix |
People
(Reporter: ana.tudor.lhnh, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Steps to reproduce:
Set a calc() value font-size and a font-family via the font shorthand:
font: calc(1em + 20vmin) sans-serif; // doesn't work (both stable and Nightly)
Actual results:
This rule doesn't get applied. It's crossed out (Invalid property value) in dev tools.
Expected results:
It should work. It works in Chrome and Edge. Setting the same values separately works in Firefox as well, no problem when setting a calc() font-size via the longhand:
font-size: calc(1em + 20vmin); // works
Live test: https://codepen.io/thebabydino/pen/NRbqmW
Component: Untriaged → Layout
OS: Unspecified → Windows 10
Product: Firefox → Core
Hardware: Unspecified → x86_64
Updated•9 years ago
|
Component: Layout → CSS Parsing and Computation
We probably need to both:
* audit parsing of all shorthands
* have calc() parsing return the type of the thing that it parsed to its caller, so that the caller can decide whether that value is allowed
(Although calc() really messes with the lookahead tricks that we use in shorthand parsing; probably the simplest fix is to play tricks with the tokenizer. That might avoid the need for calc() to return the type, which would actually require more substantial refactoring of most shorthand parsing functions.)
Updated•9 years ago
|
Priority: -- → P3
Comment 3•7 years ago
|
||
I'm unable to reproduce this in stable or Nightly.
* Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0
* Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0
Conjecture: was this somehow fixed as a side effect of moving to Quantum/Stylo?
For the record, I can still reproduce this in Firefox 52 ESR, which is nearing EOL.
* Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 4•7 years ago
|
||
It's very possible that the switch to servo style system fixed this. Given comment 3 I'm going to close this as FIXED.
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox-esr52:
--- → wontfix
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•