jbms / sphinx-immaterial

Adaptation of the popular mkdocs-material material design theme to the sphinx documentation system
https://jbms.github.io/sphinx-immaterial/
Other
196 stars 29 forks source link

not all tables are confined to article's width #141

Closed 2bndy5 closed 2 years ago

2bndy5 commented 2 years ago

I often use csv-table or list-table for creating tables, but I've noticed that not all tables are confined to the article section's width. When the window is narrow enough for the local Toc to be shown, sometimes I see a table bleed over: image

Adding the CSS,

.md-typeset table.data:not(.plain) {
  /* formerly `display: table;` */
  display: inline-block;
}

fixes this issue: image

jbms commented 2 years ago

Might be interesting to figure out if this behavior is different compared to mkdocs-material

2bndy5 commented 2 years ago

I got the idea for inline-block by looking at the mkdoc-material's output for tables.

jbms commented 2 years ago

Ah yes --- I remember modifying that in _typeset.scss to fix something. That was before we started adding /* sphinx-immaterial: */ comments to indicate the reason for changes...

I think the reason for the change was either something to do with wrapping, or something to do with left/right/center alignment of the table itself within the page.

2bndy5 commented 2 years ago

fixed in v0.9.0