Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

borders in the table do not collapse. Should have border-collapse:collapse property #9

Open
Wikinaut opened this issue Nov 24, 2012 · 8 comments

Comments

@Wikinaut
Copy link

On my browser, tables look like this - the border lines on table rows and cells do not collapse:

I already tried to apply a patch, but I did not succeed in short time.

@Wikinaut
Copy link
Author

I also found, that a class is undefined:

mostly like stemming from line 64 in datatables-render.js

htmlTbl += "<tr style='vertical-align:" + rowVAlign + ";background-color:" + 
rowBgColor + "; " + borders + "!important;' class='" + trClass + "'>";

@gedion
Copy link
Owner

gedion commented Nov 24, 2012

Yes. I thought we needed css for rows but turned out not so but I didn't bother to clean it up.

@ audreyt did really well cleaning it up with the recent pull request. However I do not know much about LiveScript and I'm not sure weather to continue as JS or LS.

@Wikinaut
Copy link
Author

Hi. I further analysed the border-collapse problem. I found,that a 3x3 table (for example) is composed of 3(!) tables with 1row x 3 colums each. This is why the "inside" borders do not collapse: they belong to different tables.

Can you confirm my observations

  • the thick un-collapsed borders as shown
  • the "one" table in the pad is actually constructed as three tables of single-row tables
    ?

It was not possible to find quickly an easy and convincing fix, because it would require a complicated re-design. Have you ever thought about doing this (a redesign). I added and checked in

* { border-collapse:collapse }

or manually, in all table related tags table, tbody, tr, td, but this did not the trick, because it isn's a single table as said above.

@Wikinaut
Copy link
Author

I am willing to help to fix the plugin.

@Wikinaut
Copy link
Author

@gedion Thanks for pointing to the work of audreyt - haven't seen that before. Will have a look to it. The move to LiveScript will certainly not please everyone.

@gedion
Copy link
Owner

gedion commented Nov 24, 2012

@Wikinaut. Thank you Wikinaut. Would appreciate your help tremendously.

Yes. Your analysis is correct. Each row is a table itself. As you know changesets redraw a magic dom line each time there is a change. If we put an entire table(multiple rows) within a magic domline, performance becomes an issue. Also epLite limits the length of line characters to be about 2^11(2048). The size of a table would be limited drastically.

So we decided that we will have one row(hence one table) per line.

As you have run into, this brings accidental complexities. We have overcome a lot.

One suggestion to the one you're noticing is that we can apply our own border line sizes to make all border lines appear the same size. Right now, notice only the outer borders are 1 size less than the inner borders.

If we can make them the same size, the table won't be as ugly. However it will mean that we can't have a table of border size = 1

@Wikinaut
Copy link
Author

@gedion ty very much for your detailed explanation, which helped me a lot. I still think, it would be possible to have all 1px borders (but now I know, this is not a matter of simply applying "border-collapse:collapse" to all table elements)

@gedion
Copy link
Owner

gedion commented Nov 25, 2012

It'll be interesting to see your solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants