From 593ed5edea5b844cb6b94c65692c6953a22ab6b2 Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Fri, 24 Aug 2018 11:47:50 +0200 Subject: [PATCH] Fix table regressions. This PR fixes table block regressions introduced in https://github.com/WordPress/gutenberg/pull/7899#issuecomment-411732824 The block property for the table makes sure that it's mobile responsive. The "display table" is necessary for fixed layout to work. --- packages/block-library/src/table/style.scss | 1 + packages/block-library/src/table/theme.scss | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/block-library/src/table/style.scss b/packages/block-library/src/table/style.scss index 31a7ae479957a3..a81ec0669af32f 100644 --- a/packages/block-library/src/table/style.scss +++ b/packages/block-library/src/table/style.scss @@ -1,6 +1,7 @@ .wp-block-table { // Fixed layout toggle &.has-fixed-layout tbody { + display: table; table-layout: fixed; } } diff --git a/packages/block-library/src/table/theme.scss b/packages/block-library/src/table/theme.scss index 86872dfa9e84c3..f33c55b519f04e 100644 --- a/packages/block-library/src/table/theme.scss +++ b/packages/block-library/src/table/theme.scss @@ -1,5 +1,6 @@ .wp-block-table { overflow-x: auto; + display: block; // Necessary in order for this table to be mobile responsive. border-collapse: collapse; width: 100%;