Closed Bug 811826 Opened 12 years ago Closed 12 years ago

[Browser] action_menu.css uses invalid "line-height: auto", triggering JavaScript Warning: "Error in parsing value for 'line-height'. Declaration dropped."

Categories

(Firefox OS Graveyard :: Gaia::Browser, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dholbert, Assigned: kgrandon)

Details

(Keywords: b2g-testdriver, unagi)

Attachments

(1 file)

Noticed this go by in my logcat output: JavaScript Warning: "Error in parsing value for 'line-height'. Declaration dropped." {file: "app://browser.gaiamobile.org/style/action_menu.css" line: 84} Looks like this points to: https://github.com/mozilla-b2g/gaia/blob/master/apps/browser/style/action_menu.css#L84 which has: > line-height: auto; which is invalid. line-height doesn't accept any value called "auto". See documentation here: https://developer.mozilla.org/en-US/docs/CSS/line-height It does accept "normal" -- that's probably what we want here...?
Hi Daniel - Have a second to review this quick pull request? :)
Assignee: nobody → kgrandon
Status: NEW → ASSIGNED
Attachment #728396 - Flags: review?(dholbert)
"normal" is presumably what was intended (instead of "auto"), so this makes sense from that perspective. However, your patch could conceivably change behavior -- currently, this line is getting completely ignored (since it's invalid), but your patch will make the line actually meaningful. Given that we're (presumably) doing OK with the invalid CSS, maybe we want to just remove the line? (Is there any reason we actually need to force "line-height:normal" there? i.e. is there another rule somewhere that imposes a different line-height on an element that this selector matches, and we have to override that?)
FWIW, it looks like the only "line-height" declarations elsewhere in this .css file are setting it to explicit values (1em and 3.8rem) -- we don't bother to explicitly set it to "normal" anywhere else. (And the selector with "normal" doesn't look like it'd collide with the selectors that set it to 1em / 3.8rem. So I think it can probably just be dropped...?) So: I tend to think we should just drop this line, rather than making it "normal" -- at least, that seems at least as reasonable, and it's guaranteed to preserve existing behavior. I don't really know the context of this CSS, though -- you might want to check with Ben Francis, since git blame says he wrote this code in https://github.com/KevinGrandon/gaia/commit/ae1a43b666cf55405711d9d0c16a65a9f98bba74 , and he can speak more intelligently than I can about the impact or non-impact of your patch.
After checking - it appears that this element has no inherited line-height properties and can safely be removed. Pull request has been updated.
Comment on attachment 728396 [details] Github pull request pointer OK -- happy to r+ the removal, since it's just removing a line that has no effect (and whose intended effect appears to be unnecessary).
Attachment #728396 - Flags: review?(dholbert) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: