Closed Bug 165703 Opened 22 years ago Closed 22 years ago

Background-image positioning on items broken over a line is incorrect

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 14777

People

(Reporter: aquarius, Assigned: dbaron)

References

()

Details

(Keywords: qawanted)

If an inline element is broken across a line by wrapping (on hitting the right
edge of the viewport), a CSS-defined background-image styled as "right
no-repeat" is displayed on the right-hand-side of the first part of the element
(before the line break), rather than at the right-hand-side of the whole element
(i.e., the part after the line break), as in the example URL.
I'll confirm that I see this on Win98 build 2002-08-30, but I'm not sure if what
you state is the proper behaviour, need someone with such knowledge to confirm that.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Oh, yay.  That inline containing block stuff again...

Ian, David, what's the right rendering here?  It seems to me that the expected
rendering from comment 0 is correct, so we should be looking at our
continuations when doing this.... 

One interesting question is what happens for a background image styled as "right
repeat-y" for an inline that wraps... do we get:

  ____________________________
__|________________________img|
|__________________img|

or do we get:

  ____________________________
__|________________img________|
|__________________img|

?
Keywords: qawanted
OS: Windows 2000 → All
Hardware: PC → All
Boris (comment 2): I believe the answer is neither.  Given my understanding of
inline layout, we should get:
   _____________________________
 __|____________________________    <-- note I removed your end-line caps
 ___________________img|

Inline objects are constructed as if they were laid out as one long block and
then broken across lines.  Thus your example would start as:
 ___________________________________________________
 |______________________________________________img|

...and then be snapped into however many pieces were necessary for display
across multiple lines.  That's why borders on lines broken across lines don't
cap on the ends.  Outlines are a different story, but then they always have been.

Of course, if the WG decided something different recently and I missed it, David
or Ian will be able to correct me.
OS: All → Windows 2000
Hardware: All → PC
Well, what you wrote is what I proposed in my CSS 2.1 comments, so I agree with
you (Eric). The spec, however, is silent on the matter at the moment. Indeed,
according to CSS 2, 'background-position' doesn't apply to inline elements.
Er-- how'd I miss that?  You're right, and even in CSS2.1 and CSS3 
'background-position' does not apply to inline elements.  Damn, there goes a
trick from one of my recent books.  Is there any likelihood of changing that
behavior for either 2.1 or 3, or has that already been discussed and shot down?
It's in both my CSS 2.1 last call comments and my CSS3 last call comments and at
a recent meeting I _think_ we resolved to do it (check the wednesday afternoon
minutes to be sure).

*** This bug has been marked as a duplicate of 14777 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.