emareg / classlesscss

CSS with few but great styles for basic HTML5 tags
http://classless.de
MIT License
222 stars 16 forks source link

table isn't a display: block element #26

Closed captn3m0 closed 2 months ago

captn3m0 commented 3 months ago

switches table back to display: table

Found this while debugging fullcalendar on a site, which uses tables extensively but broke with classless css.

basteyy commented 3 months ago

Hmm, causes by additional css which changes the table. Normally, when there is no reset of table, this should not necessary. Can you show the buggy example/page?

captn3m0 commented 3 months ago

All 3 using the default fullcalendar setup:

  1. Default styles without classless-css: https://jsfiddle.net/7hL8jvgq/1/. fullcalendar only comes with some inline styles. This works.
  2. Including classless-tiny immediately breaks the layout: https://jsfiddle.net/tuka8bps/1/
  3. Setting display: table !important fixes it: https://jsfiddle.net/qu84msc0/1/
emareg commented 2 months ago

I think this is a valid point. If the table is inside a figure, I switch anyway back to display: table. I am not sure if the margins and overflow settings might be a problem. But I think I will remove table from block settings in the next update.

captn3m0 commented 2 months ago

Thanks for the fix.