Closed Bug 1559968 Opened 5 years ago Closed 5 years ago

lineargradient tobottom does not appear to using correct geometry calculation

Categories

(Core :: Web Painting, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1259924

People

(Reporter: brad.arant, Unassigned)

Details

Attachments

(2 files)

Steps to recreate and identify issue:
css:
body {background: linear-gradient(to bottom, #ccc, #444);
font-family: exo2;
margin: 10px 10px 10px 10px;
width: 98%;
}

The 'to bottom' appears to use the length of the contents of the page as opposed to the window's bottom as shown in the screen grabs. The screen grabs are from Android but the issue is visible in the desktop version of Firefox.

In all other browsers this 'to bottom' indicates the bottom of the visible page area and does not limit itself to the container's contents as appears to happen in Firefox. Appears web-kit also shares this issue per this SO discussion:

https://stackoverflow.com/questions/2869212/css3-gradient-background-set-on-body-doesnt-stretch-but-instead-repeats

Component: CSS Parsing and Computation → Web Painting

The priority flag is not set for this bug.
:mattwoodrow, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(matt.woodrow)

My reading of https://www.w3.org/TR/css-backgrounds-3/#root-background suggests that what we're doing is correct (using the size of the root element for the background positioning area, even when propagating the background to the canvas).

It looks like both Chrome and Safari on OSX are using the sizing it to the window size though. Dbaron, any thoughts on which is the correct behaviour?

Flags: needinfo?(matt.woodrow) → needinfo?(dbaron)
Priority: -- → P3

Ah, this is just Blink and WebKit stretching the size of the root element on quirks mode. I'm pretty sure we have a bug on file for that.

A reduced test-case for this is data:text/html,<html style="background: red"><body style="margin: 0; background: green">.

So duplicate of bug 1259924 then?

Flags: needinfo?(dbaron)

Yes.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: