Opened 12 years ago

Closed 12 years ago

#11956 closed defect (wontfix)

claro regression: nested BC/CP padding issue

Reported by: Karl Tiedt Owned by: Julie Santilli
Priority: high Milestone: tbd
Component: Dijit - LnF Version: 1.5
Keywords: bordercontainer contentpane padding regression Cc: Adam Peller
Blocked By: Blocking:

Description (last modified by Adam Peller)

Having a BC nested in a way to get 4 columns each 25% of total area... left most BC ends up with the left region being bigger by the padding size in claro from .claro .dijitcontentpane { padding: 8px; }

example can found here:

first yellow CP is wider than 2nd column, and both left most columns are different sizes than the 2 right most columns despite them all being effectively set to 50% of the overal center region

Change History (4)

comment:1 Changed 12 years ago by Adam Peller

Cc: Adam Peller added
Component: themesDijit - LnF
Description: modified (diff)

comment:2 Changed 12 years ago by bill

I wouldn't call this a claro bug because there's nothing wrong with putting padding in a ContentPane.

The test file sets width:50% on the !Contentpanes, and setting width:50% any <div> that has padding will expectedly make it take up more than 50% of it's container's width. Not sure if there's anything we can/should do about that.

Could try using border-box sizing for ContentPanes, which is settable through CSS on FF, safari, and opera, but not IE.

comment:3 Changed 12 years ago by Karl Tiedt

if its not a bug, then what do you call 2 identical BC's that are laying out their children... all sized at 50% to different widths? Are we no longer to assume that 2 widgets with same styles will end up identical in size?

comment:4 Changed 12 years ago by bill

Resolution: wontfix
Status: newclosed

Not sure which two widgets you are talking about. Your test file has two BorderContainer's with width:50%, but they are at different nesting so naturally they have different widths; one is about twice as wide as the other. You only have one ContentPane with width:50%.

In any case, it's not a bug because it's working according to the HTML spec, which specifies content-box sizing. Many people consider that a poor design choice for the spec, which is probably why the new browsers support border-box/-moz-border-box/-webkit-border-box CSS directives.

You can use those border-box CSS directives and quirks mode for IE to get the effect you want. Or just override the padding on the ContentPane to 0, although I think it looks better with padding.

I'm going to close this ticket because I can't see a change to dijit that makes sense.

Note: See TracTickets for help on using tickets.