Open ofajardo opened 3 weeks ago
@rich-iannone we often set html-table-processing: none in the qmd top-matter, but this need is undocumented in Great Tables. Do you mind finding a place to document this, and to expose how people should resolve it?
It looks like there's an option but it's no possible to set anywhere
Apparently the issue with the VSCode interactive window not showing table borders has been described before: https://stackoverflow.com/questions/78162666/adding-borders-to-visual-studio-code-jupyter-notebook-table-rendering
The borders issue maybe even solved on github: https://github.com/microsoft/vscode/issues/210462
Ah, thanks for digging up that vs code issue! The !important
stuff would take a lot of aggressive css to override, so this would be a huge improvement for us
thanks for the html-table-processing: none suggestion, that works! Still, I think it would be good to be able to control it from great_tables, the user may want to inactivate the processing only for the GT object and not for the whole document.
what I am still struggling with is how to remove the gray borders everywhere on the table, whatever properties I try from here seem ineffective (except maybe the table top and bottom border). When I inspect the table in the browser and start playing with the styles can overwrite those gray borders with something else for the top and bottom of the table, but cannot change all the other internal borders, they seem to be really fixed and I cannot understand where they are inheriting from.
Description
My table renders differently on a VSCode Jupyter interactive window than on a quarto html report.
Reproducible example
I am trying to style my table in a similar style as tables here. I have tried this:
running this code on VScode (on a jupyter interative window) either from a .py file or a .qmd file gives me this appearance:
This is close to what I want, although I am intrigued on why the options column_labelsborder* and row_group_padding_horizontal seem to be ineffective. Maybe I am using them wrong?
Now, I render the quarto report as html, and in the resulting html I get this, which looks quite different from what I got in the interactive window.
Inspecting the html code, I see that the option data-quarto-disable-processing is set to false, which seems problematic. I could not find any way to change that in great_tables, so I change it manipulating the html directly:
In the interactive window the output looks the same. And now when rendering the quarto report it looks like this:
The zebra strips have disappeared, but I still have the gray borders, which I do not see in the interactive window. Inspecting gt_raw, I do see that indeed several style properties of the table are set to gray, for example:
So, I guess that suggests that now the html report is correct and the VScode interactive window is not displaying correctly the borders? I tried to set table_border_top_color="#000000" and indeed in the html I can see that now the top border is black in the html, while in the interactive window I do not see any color.
Expected result
I would expect the appearance of the table to be the same in both outputs, that would help to make the development quicker, since apparently now I have to change properties and render the html to inspect the result.
While writing this, I realize that it may be a problem of VScode rather than great_tables, but it would be nice to have some solution or workaround.
Is it possible for instance to disable all borders at once in great_tables?
Another thing is that it should be possible to set data-quarto-disable-processing from python.
Finally some properties like column_labelsborder* seem to not be working in my example.
Any suggestions would be appreciated, thanks a lot for your help!
Development environment
Additional context
Add any other context about the problem here.