webtrees icon indicating copy to clipboard operation
webtrees copied to clipboard

Markdown tables - change from v2.0 - deliberate?

Open ddrury opened this issue 2 years ago • 3 comments

Previously markdown tables css had border-collapse: collapse; now it is over-ridden in the <theme>.css and set to to border-collapse: separate;

ddrury avatar May 23 '22 15:05 ddrury

The markdown class is not applied anywhere in webtrees currently, lack of this css is the cause of the problem (although I think only tables are affected)

This is also the cause of https://github.com/fisharebest/webtrees/issues/4441

ddrury avatar May 29 '22 09:05 ddrury

deliberate?

No. We cannot add <div class="markdown"></div> in the markdown renderer, as it forces the text to be a block on the next line. See recent bug reports.

So, we must now add it wherever it is used, and not for single-line text.

I guess I must have missed some of the cases.

fisharebest avatar May 29 '22 20:05 fisharebest

Only markdown tables are missing some styling which seems to me to be consistent for whatever device it is viewed on. Therefore the simplest solution for me is to add class markdown to const MarkdownFactory::CONFIG_MARKDOWN table->wrap->attributes->class and in _markdown.css delete everything not related to tables.

BTW if you wish to keep .markdown th {...} you need to add !important as its being over-ridden by <style>.css .wt-facts-table

ddrury avatar May 30 '22 09:05 ddrury