[Webkit-unassigned] [Bug 86942] New: background-size:0 shows as 1px instead of invisible

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat May 19 05:52:00 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=86942

           Summary: background-size:0 shows as 1px instead of invisible
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Windows 7
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: CSS
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: bjarke02 at gmail.com


Created an attachment (id=142863)
 --> (https://bugs.webkit.org/attachment.cgi?id=142863&action=review)
This example demonstrates the problem

I think i might have found a bug in Chrome 19.0.1084.46 and Safari 5.1.7 (7534.57.2) which is still in the latest nightly build of WebKit. (Not in Firefox, Opera or IE)

When setting the size of a background image to zero with the CSS declaration "background-size: 0", WebKit displays the background as if its size was 1 pixel instead of zero (gives same result as "background-size: 1px").

-----

This seems like a bug. 

(In practice, this affects things such as animating the background-size of an element from JavaScript (my case), for example. It makes it harder to animate the size of the background image from/to the "invisible-state" (zero size). (mouse-over on items in a menu, for example))

I'm not used to reading W3C-specs, but this document at http://www.w3.org/TR/css3-background/#the-background-size seems to suggest that the background image should not be shown when its size is set to 0 (or in other ways resolves to 0): "If the background image's width or height resolves to zero, this causes the image not to be displayed. (The effect is the same as if it had been a transparent image.)".

(An older draft (http://www.w3.org/TR/2002/WD-css3-background-20020802/#background-size) was more clear: "A size of zero is allowed, but causes the image not to be displayed. (In particular, it will not be repeated.)")

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list