Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

[docz-theme-default] responsive tables don't render full width #684

Closed
smeijer opened this issue Mar 14, 2019 · 0 comments
Closed

[docz-theme-default] responsive tables don't render full width #684

smeijer opened this issue Mar 14, 2019 · 0 comments

Comments

@smeijer
Copy link

smeijer commented Mar 14, 2019

Bug Report

Describe the bug

The table from docz-theme-default, doesn't render correctly on some breakpoints:

To Reproduce

  1. Create a readme.mdx
  2. Add a table as content:
 A  |  B  |  C 
--- | --- | ---
 1  |  2  |  3
 4  |  5  |  6
  1. npm run docz:dev
  2. Scale your browser window
  3. See table not being 100% wide

Additional context/Screenshots

docz-table

Changing the display: block to display: table on the <table element, trough dev tools, fixes the rendering issue.

docz-table-2

I've also tried the style override through the theme file, as suggested in the readme but that doesn't seem to change anything:

export default {
  themeConfig: {
    styles: {
      h1: {
        fontSize: 100,
      },
      table: {
        display: ['table', 'table', 'table', 'table'],
      },
    },
  },
};

*edit:

This theme config does solve the issue:

  themeConfig: {
    styles: {
      table: {
        display: 'table',
      },
    },
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants