{css1} Inline box model is not considering block-level parent's line-height

VERIFIED FIXED in M11

Status

()

Core
Layout
P2
critical
VERIFIED FIXED
19 years ago
18 years ago

People

(Reporter: Hixie (not reading bugmail), Assigned: buster)

Tracking

({css1})

Trunk
x86
Windows 98
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

19 years ago
You fail test 2 on this EvilTest:
   http://www.bath.ac.uk/%7Epy8ieh/internet/eviltests/lineheight2.html

From http://www.w3.org/TR/REC-CSS2/visudet.html#propdef-line-height :
   If [line-height] is set on a block-level element whose content is
   composed of inline-level elements, it specifies the minimal height of
   each generated inline box.

See also:
   http://lists.w3.org/Archives/Public/www-style/1999Jan/0037.html
(Reporter)

Comment 1

19 years ago
*** Bug 4304 has been marked as a duplicate of this bug. ***

Updated

19 years ago
Assignee: rickg → peterl
(Reporter)

Comment 2

19 years ago
*** Bug 7097 has been marked as a duplicate of this bug. ***
(Reporter)

Comment 3

19 years ago
See also bug 7097's test page:
   http://www.netppl.fi/%7esairwas/tests/image-links-vspacing/

AFAICT, the images should have gaps between them on both lines.

Updated

19 years ago
QA Contact: petersen → chrisd

Updated

19 years ago
Assignee: peterl → kipp
(Reporter)

Updated

19 years ago
Target Milestone: M15
As I've said before, I think that statement in CSS2 should have said line box
rather than inline box.  However, I don't think there's been official word yet.

Updated

19 years ago
Status: NEW → ASSIGNED
(Reporter)

Updated

19 years ago
Blocks: 5821
(Reporter)

Updated

19 years ago
Target Milestone: M15 → M11
(Reporter)

Comment 5

19 years ago
As mentioned in bug 5821, fixing this should be relatively easy: you just have to
insert an anonymous inline element around all inline content in a block, and
then set its line-height to 'inherit'. For example, the following:

   <div>
      <span> abc </span>
      <span> def </span>
   </div>

...would internally become

   <div>
      <anonymous-inline style="line-height: inherit">
         <span> abc </span>
         <span> def </span>
      </anonymous-inline>
   </div>

I believe that is all that is needed; David may be able to confirm or deny.

[Moving to M11 like 5821, as this should be fixed before 5821...]

Updated

19 years ago
Severity: normal → critical
Priority: P3 → P2

Updated

19 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED

Comment 6

19 years ago
Turns out to have been a bug in line-height inheritance which is now fixed.

Updated

19 years ago
Status: RESOLVED → VERIFIED

Comment 7

19 years ago
Using 9/28 Apprunner and the Evil Test provided, verified bug fixed. The
examples in 2. display identically to the two cases in 1.
(Reporter)

Updated

18 years ago
Keywords: css1
(Reporter)

Comment 8

18 years ago
Migrating from {css1} to css1 keyword. The {css1}, {css2}, {css3} and {css-moz}
radars should now be considered deprecated in favour of keywords.
Sorry for the spam...
You need to log in before you can comment on or make changes to this bug.