Bug 12934 - Table cells need to act like box-sizing border-box in the vertical direction
Summary: Table cells need to act like box-sizing border-box in the vertical direction
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tables (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac (Intel) OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://www.kimutzon.dk/padding.html
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2007-03-01 03:04 PST by Jeppe Utzon
Modified: 2022-07-06 16:10 PDT (History)
3 users (show)

See Also:


Attachments
Test case of the padding bug (1.31 KB, text/html)
2007-03-01 03:05 PST, Jeppe Utzon
no flags Details
Testcase for table cells height calculation. (859 bytes, text/html)
2011-09-29 03:48 PDT, Lev Solntsev
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeppe Utzon 2007-03-01 03:04:06 PST
I discovered a CSS (?) bug in Safari that concerns padding and table cell size. If I have a fixed size table cell (width and height specified) then when I add CSS padding to this cell it will grow beyond the size specified even though the content would have fit easily inside the original sized cell. It's hard to explain in text, but look at the example code I put online and it will all make sense. :) Tested this in both the current latest consumer realease of Safari and in the nightly build. The cells behave correctly (are the same size) in Firefox

Cheers, Jeppe Utzon
Comment 1 Jeppe Utzon 2007-03-01 03:05:33 PST
Created attachment 13435 [details]
Test case of the padding bug
Comment 2 Dave Hyatt 2007-03-01 05:49:06 PST
Need to support the box-sizing quirk of border-box in the vertical direction for heights.
Comment 3 Sam Weinig 2007-03-01 10:22:21 PST
Are we certain this is a bug.  In quirks mode, the webkit rendering matches firefox.
Comment 4 Lev Solntsev 2011-09-29 03:48:37 PDT
Created attachment 109145 [details]
Testcase for table cells height calculation.

Yep, certain bug. Box-sizing:border-box should affect table cell height. I've made a test case for that; for Webkit the second row does matter.

BTW, Firefox have own bug: https://bugzilla.mozilla.org/show_bug.cgi?id=295315
Comment 5 Ben Frain 2013-08-07 02:04:22 PDT
This issue is still present in current Safari release (OS X 6.0.5 (8536.30.1)) and the WebKit nightly (r153759). Here is a reduction test case. You can toggle the box-sizing rule in the CSS box and see the difference. Compare on Safari and Chrome/Firefox to see what should happen.

http://codepen.io/benfrain/pen/zqCKs
Comment 6 Brent Fulgham 2022-07-06 16:10:17 PDT
Safari, Chrome, and Firefox produce the same rendering for both test cases. I believe any compatibility issue has been resolved since 2013.