This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 16556 - [Shadow]: What style is expected if a shadow root is added to replaced elements?
Summary: [Shadow]: What style is expected if a shadow root is added to replaced elements?
Status: RESOLVED WORKSFORME
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 14978
  Show dependency treegraph
 
Reported: 2012-03-28 07:40 UTC by Shinya Kawanaka
Modified: 2012-05-07 19:40 UTC (History)
0 users

See Also:


Attachments

Description Shinya Kawanaka 2012-03-28 07:40:28 UTC
Please let me confirm the expected behavior...

Let's consider the following img elements.

<img id="e1" src="foo.jpg" width="300">
<img id="e2" src="foo.jpg" style="width: 300px">

And add the following shadow root to them.

#shadow-root
    <div style="padding: 10px">
        <shadow></shadow>
    </div>


What is the expected layout? 
(1) #e1 has 320px width, and #e2 has 320px as well.
(2) #e1 has 300px width, and #e2 has 300px as well.
(3) #e1 has 320px width, but #e2 has 300px width.
Comment 1 Dimitri Glazkov 2012-03-30 23:08:15 UTC
The width attribute and width style property should have the same effect. Also, the behavior should be as if this is:

<div style="width:300px"><div style="padding: 10px">...</div></div>

Does this make sense?
Comment 2 Shinya Kawanaka 2012-04-02 02:13:44 UTC
(In reply to comment #1)
> The width attribute and width style property should have the same effect. Also,
> the behavior should be as if this is:
> 
> <div style="width:300px"><div style="padding: 10px">...</div></div>
> 
> Does this make sense?

Got it.