Closed Bug 772753 Opened 12 years ago Closed 10 years ago

Outline style problem (absolute positioned childs should not expand parent's outline)

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 687311

People

(Reporter: teploukhovk, Unassigned)

Details

(Keywords: testcase)

Attachments

(3 files)

Attached image Untitled.png
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11

Steps to reproduce:

Page code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<title></title>
	<style type="text/css">
		.cls1
		{
			position: relative;
			height: 50px;
			width: 50px;
			background-color: red;
			outline: 1px solid #000000;
		}

		.cls2
		{
			position: absolute;
			left: -10px;
			top: -10px;
			height: 20px;
			width: 20px;
			background-color: yellow;
		}

		.cls3
		{
			position: absolute;
			right: -10px;
			bottom: -20px;
			height: 20px;
			width: 20px;
			background-color: green;
		}
	</style>
</head>
<body>
	<div class="cls1">
		some text
		<div class="cls2"></div>
		<div class="cls3"></div>
	</div>
</body>
</html>



Actual results:

Outline border covers all absolute elements.


Expected results:

Outline border must covers only div with className cls1.
Screens of expected and current result in attachment.
Attached file Testcase
Attached file simpler testcase
Duplicate?
Component: Untriaged → Layout
Keywords: testcase
OS: Windows 7 → All
Product: Firefox → Core
Hardware: x86_64 → All
Summary: Outline style problem → Outline style problem (absolute positioned childs should not expand parent's outline)
Version: 13 Branch → Trunk
Descendant elements definitely should expand the parent's outline.  The question here is whether absolutely positioned descendants should be an exception to that rule.
(In reply to David Baron [:dbaron] from comment #4)
> Descendant elements definitely should expand the parent's outline.  The
> question here is whether absolutely positioned descendants should be an
> exception to that rule.

I agree.
I think this bug depends on https://bugzilla.mozilla.org/show_bug.cgi?id=480888
Status: UNCONFIRMED → RESOLVED
Closed: 10 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: