(*** This bug was imported into bugs.kde.org ***) Package: khtml Version: KDE 3.0.6 CVS/CVSup/Snapshot Severity: wishlist Installed from: Compiled sources Compiler: gcc 2.95.4 OS: Linux OS/Compiler notes: Debian Sid border-collapse does not work. border-collapse should merge cell borders so that if 2 cells next to each other have a border-width of 1px the border drawn should be 1px rather than 2px. For an exmaple see http://www.davidpashley.com/tutorials/wvdial-pppd-dod.html and look at the Revision History table. (Submitted via bugs.kde.org)
Not only border-collapse but many other CSS2: table properties are not supported in KHTML. On Sunday 21 July 2002 11:02 pm kde-bugs@davidpashley.com wrote: | Package: khtml | Version: KDE 3.0.6 CVS/CVSup/Snapshot | Severity: wishlist | Installed from: Compiled sources | Compiler: gcc 2.95.4 | OS: Linux | OS/Compiler notes: Debian Sid | | border-collapse does not work. border-collapse should merge cell borders | so that if 2 cells next to each other have a border-width of 1px the | border drawn should be 1px rather than 2px. For an exmaple see | http://www.davidpashley.com/tutorials/wvdial-pppd-dod.html and look at the | Revision History table. | | (Submitted via bugs.kde.org) | | | (Complete bug history is available at | http://bugs.kde.org/db/45/45570.html) | _______________________________________________ | Konq-bugs mailing list | Konq-bugs@mail.kde.org | http://mail.kde.org/mailman/listinfo/konq-bugs -- Vadim Plessky http://kde2.newmail.ru (English) 33 Window Decorations and 6 Widget Styles for KDE http://kde2.newmail.ru/kde_themes.html KDE mini-Themes http://kde2.newmail.ru/themes/
In this page it is said that border-collapse is supported. http://konqueror.org/css/ Nevertheless I think it isn't. Now I do not mean change the information on webpage to reflect reality. What I mean is: you should add support for this. I think 'border-collapse: collapse' is the only cross-browser method (correct me if I'm wrong) to give tables a look where cells are separated by single line (and using stylesheet file not style attributes). In Konqueror one can emulate this by using :first-child pseudo-class, but this isn't supported by IE. And asking m$ to support something is pointless (although i've never tried). And it's not always possible to dynamically include different stylesheets for different browsers. So to create tables that look alike in IE, Mozilla and Konqueror you should strongly consider implementing what's neccessary to support border-collapse in a proper way.
On the following page you can see the missing functions for border-collapse, too. It was: http://www.meyerweb.com/eric/css/tests/css2/sec17-06.htm I think we have implemented it a bit in the cvs-Version of KDE, bon't implemented all things that are in css2. For example the last table was not correctly renderd and the first table have not the bigger border. So I hope it was work in process!! :) Sven
Created attachment 2017 [details] css border-collapse testcase attached a small testcase, check it out in Moz/Opera7 to see how it should look like.
Isn't this rather a bug than a wishlist item? The code looks like as if "border-callapse" was already implemented in Konqueror but obviously it doesn't work.
it's parsed, but not rendered. We parse all of css2, that doesn't mean we support them all.
I think this is definetely a bug. Without support for border-collapse: collapse there is IMHO no way to achieve with styles what is possible with simple html: <table border="1" cellspacing="0" cellpadding="0"><tr><td></td><td></td></tr></table> With border-collapse support, it's easy: table { border-collapse: collapse } table td { border: 1px solid black } Ok, it's possible, but only with class or style atrributes correctly set for different cells. Which is not always possible for dynamic content.
Safari has been recently added support for border-collapse. So khtml will eventually support it, too (but not for 3.2).
anyway, all other unimplemented CSS attributes are bugs, so this one should be too :)
Just a quick note for people seeing this problem... I have been able to bypass some of the problems created by this (as in when one would like to have no spaces between the table cells, which IE does with the border-collapse: collapse) by adding an additional border-spacing: 0px; which it seems Konqueror pays attention to. Not sure if that helps anyone, but until this is all straightened out maybe it will.
*** Bug 56918 has been marked as a duplicate of this bug. ***
*** Bug 59528 has been marked as a duplicate of this bug. ***
The work around in comment #10 doesn't completely solve the problem. as the borders are not being collapsed, what you get is no space between two adjacent 1px borders, and therefore you get a two pixel border on those cells. A further work around is to put something like (depending on your needs): table { border-spacing: 0px; border-right: 1px solid black; border-top: 1px solid black; } th { border: 1px solid black; border-right: 0px; border-top: 0px; } td { border: 1px solid black; border-right: 0px; border-top: 0px; } Which is cross-browser compatible (I think). (All this just to replace border-collapse: collapse is a bit excessive though)
Created attachment 4996 [details] test case This test case doesn't add much over the original test case except that is shows two tables side by side (one with cell-spacing=0 and one with border-collapse) that should both end up being rendered identically once the bug has been resolved.
Created attachment 5000 [details] testcase from W3C CSS2 Specification please don't talk about workarounds and take a look at the CSS specification... http://www.w3.org/TR/CSS2/tables.html#collapsing-borders - there you can see the expected result ... Firefox can handle this, why cannot Konqueror? (OK, this is volunteer work ... but still I would rather see this bug fixed than some new "improvements" like the stupid Google box - I can google with "protocol gg:", why to have another screen-space-eating thing for that? and why to waste developers time with this thing?) btw, I still don't understand why http://konqueror.kde.org/css/ says that border-collapse is supported? p.s. sorry for my English...
Please recall comment #8 from Leo Savernik on 2003.10.30 in which he clearly states that Safari has already fixed the border-collapse bug (which you can prove to yourself on Safari). Therefore, Konqueror will have it soon if it is not already in CVS ... (Much more relevant questions to ask are: (1) How much of the Apple developer's enhancements to KHTML for use in Safari are making their way back into KDE's KHTML source tree? and (2) What is the turn-around time for such contributions? But these questions are off-topic for this bug forum ... )
I'm sorry, I have overlooked this since I haven't Mac ... trying iCapture (http://www.danvine.com/icapture/) the testcase looks perfectly; what a shame, I should have tried it before. However I don't think that (1) and (2) are offtopic questions here, because without answering them, it may happen that we are "waiting for Godot" - this bug was reported nearly two years ago... and since this was already fixed in Safari on 2003-10-30, why it is not fixed in Konqueror 3.2 released on 2004-02-03?
Actually, I ported border-collapse to khtml one month ago. It worked quite well, but failed on some elementary testcases. Therefore I threw it out again. Not supporting it is better than supporting it in a broken way. I tried to fix the problems, but it would have taken too much time. So I won't merge it before the remaining issues haven't been solved by the Safari guys.
kavol: fair enough. Just that this bug has been around for ages and I have seen no sign of change. IMO, from a practical perspective, just being able to get rid of the spacing would be a huge improvement with very little required effort -- treat border-collapse as cellspacing="0". This would be a real improvement even as far as the specs go, and would be a huge improvement as far as usability goes -- the vast majority of breakage in the wild has nothing to with the W3C's exotic "Border Conflict Resolution" but has everything to do with unwanted cellspacing on CSS styled websites. The bug would still remain but it wouldn't be anything like as critical as it is right now.
CVS commit by savernik: Here finally comes a patch for one of the most hated bugs: border-collapse support. I basically merged all the patches that we received from the Safari team at apple (thanks), and improved it. What makes this patch commitworthy over the old patch I wrote a quarter of a year ago, is that I was able to fix a really nasty visual bug wrt colspans [1]. In February, I attempted a fix, but I went into a direction which severly complicated matters, so I gave up. Yet recently, I suddenly got a really good idea to solve the bug in a much easier way. It is as follows: - At the precedence level BCELL, let cells only paint their very own borders, *not* the borders of their neighbours. This solves two issues. First said colspan glitch, secondly a "shift" in style that is easily reproducable on dotted/dashed borders when you smooth scroll over the table (can be tested with khtmltests/regression/tests/tables/002.html). [1] http://selfhtml.teamone.de/css/eigenschaften/anzeige/border_collapse.htm CCMAIL: 59538-done@bugs.kde.org CCMAIL: 45742-done@bugs.kde.org CCMAIL: 45570-done@bugs.kde.org M +39 -0 ChangeLog 1.243 M +8 -12 css/cssparser.cpp 1.290 M +8 -10 css/cssstyleselector.cpp 1.312 M +488 -671 css/cssvalues.c 1.45 M +8 -8 css/cssvalues.h 1.39 M +5 -5 css/cssvalues.in 1.37 M +10 -10 rendering/render_form.cpp 1.261 M +66 -32 rendering/render_object.cpp 1.260 M +7 -2 rendering/render_object.h 1.185 M +48 -4 rendering/render_style.h 1.101 M +678 -10 rendering/render_table.cpp 1.256 M +32 -1 rendering/render_table.h 1.104
Thanks for fixing this! Will the fix be in 3.2.3 ?
Definitely not. It is questionable whether it will ever be backported to the 3.2 branch.
That's really great you kept with it and solved this! Thanks Leo. On Tuesday 04 May 2004 11:05, you wrote: > ------- You are receiving this mail because: ------- > You are a voter for the bug, or are watching someone who is. > > http://bugs.kde.org/show_bug.cgi?id=45570 > l.savernik aon at changed: > > What |Removed |Added > --------------------------------------------------------------------------- >- Status|NEW |RESOLVED > Resolution| |FIXED > > > > ------- Additional Comments From l.savernik aon at 2004-05-04 13:05 > ------- CVS commit by savernik: > > Here finally comes a patch for one of the most hated bugs: border-collapse > support. > > I basically merged all the patches that we received from the Safari team at > apple (thanks), and improved it. > > What makes this patch commitworthy over the old patch I wrote a quarter of > a year ago, is that I was able to fix a really nasty visual bug wrt > colspans [1]. In February, I attempted a fix, but I went into a direction > which severly complicated matters, so I gave up. > > Yet recently, I suddenly got a really good idea to solve the bug in a much > easier way. It is as follows: - At the precedence level BCELL, let cells > only paint their very own borders, *not* the borders of their neighbours. > > This solves two issues. First said colspan glitch, secondly a "shift" in > style that is easily reproducable on dotted/dashed borders when you smooth > scroll over the table (can be tested with > khtmltests/regression/tests/tables/002.html). > > [1] > http://selfhtml.teamone.de/css/eigenschaften/anzeige/border_collapse.htm > > CCMAIL: 59538-done bugs kde org > CCMAIL: 45742-done bugs kde org > CCMAIL: 45570-done bugs kde org > > > M +39 -0 ChangeLog 1.243 > M +8 -12 css/cssparser.cpp 1.290 > M +8 -10 css/cssstyleselector.cpp 1.312 > M +488 -671 css/cssvalues.c 1.45 > M +8 -8 css/cssvalues.h 1.39 > M +5 -5 css/cssvalues.in 1.37 > M +10 -10 rendering/render_form.cpp 1.261 > M +66 -32 rendering/render_object.cpp 1.260 > M +7 -2 rendering/render_object.h 1.185 > M +48 -4 rendering/render_style.h 1.101 > M +678 -10 rendering/render_table.cpp 1.256 > M +32 -1 rendering/render_table.h 1.104
*** Bug 68987 has been marked as a duplicate of this bug. ***