pressbooks / pressbooks-book

McLuhan is the default book theme for Pressbooks.
https://pressbooks.org
GNU General Public License v3.0
20 stars 16 forks source link

Some predefined table stylings might be unexpected or even wrong #633

Open thomasdumm opened 7 years ago

thomasdumm commented 7 years ago

Description

Some predefined table stylings might be unexpected or even wrong. I made printscreens of what they look like in ebpub3 and pdf and printscreens of what I would expect them to look like.

ALSO: The editor view and the online version should be consistant with the PDF and EPUP3, eg should look like delivros_epub3.jpg, delivros_print_pdf.jpg .

Steps to Reproduce

  1. create 4 tables
  2. assign the 4 predefined tables classe to each table
  3. create pdf and epub3

Expected behavior: [What you expected to happen] delivros_epub3.jpg, delivros_print_pdf.jpg

Actual behavior: [What actually happened] clarke_epub3.jpg, clarke_print_pdf.jpg

CSS added to clake to make delivros (actually $shade-color-1 did not work for me, so is used #eee):

table:not([class]), table:not([class]) td, table:not([class]) th { border: $table-border-width solid; border-color: if-map-get($line-color-1, $type); }

.no-lines, .no-lines td, .no-lines th { border: 0; }

.lines tr { border-top: $table-border-width solid; border-bottom: $table-border-width solid; border-left: none; border-right: none; border-top-color: if-map-get($line-color-1, $type); border-bottom-color: if-map-get($line-color-1, $type); }

thead, thead td, thead th, th { background-color: $shade-color-1; } .shaded { background-color: $shade-color-1; border: 0; }


clarke_epub3 clarke_epub3 clarke_print_pdf clarke_print_pdf delivros_epub3 delivros_epub3 delivros_print_pdf delivros_print_pdf

greatislander commented 7 years ago

See also: http://alistapart.com/article/web-typography-tables

SteelWagstaff commented 4 years ago

Examples above from Clarke -- may exist in other themes as well.

mcgratay commented 4 years ago

So the Buckram default is:

Screen Shot 2020-01-21 at 4 39 04 PM

This holds true for all supported formats: EPUB, MOBI, PDF, digital PDF, webbook.

The above tables all technically meet the expected behavior for their class, but I agree that having a redundant class doesn't make much sense and that ideally the "No Lines" class could be changed to remove the lines from the top and bottom of the table.

That being said, there is some variation in the table styles among different themes, even those which have been converted to Buckram. Finding out exactly which themes and formats are affected will take further research.