Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.wp-block-table shouldn't have display: block; #8796

Closed
manake opened this issue Aug 9, 2018 · 3 comments
Closed

.wp-block-table shouldn't have display: block; #8796

manake opened this issue Aug 9, 2018 · 3 comments
Labels
[Type] Question Questions about the design or development of the editor.

Comments

@manake
Copy link

manake commented Aug 9, 2018

.wp-block-table shouldn't have display: block; in /gutenberg/build/core-blocks/theme.css

Otherwise I would have to write in my style.css table { display: table; }.

Whatever this is trying to accomplish I think you need to use some other way to do that as this is counter-intuitive.

@designsimply designsimply added the [Type] Question Questions about the design or development of the editor. label Aug 9, 2018
@jasmussen
Copy link
Contributor

This is intentional, insofar as this allows the table block to be born with some basic responsive measures. By being block, it can scale to the width of the parent element, and apply a horizontal scrollbar on smaller breakpoints. Additionally it helps enable a fixed table cell width as an option:

screen shot 2018-08-10 at 08 50 21

Though note there's a regression with that particular aspect, see #7899 (comment)

Note also that theme.scss is an "opinionated visual style", in that it requires you as a themer to opt in to receiving that style. If you make no change in your functions.php to opt into Gutenberg opinionated styles, the theme style will not be loaded for the theme. See #5360.

@earnjam since you recently mad a pull request to address a related issue, can you think of a way to keep the table table yet keep the responsive and optional fixed cell behaviors?

@manake
Copy link
Author

manake commented Aug 10, 2018

Thank you for detailed explanation.

Based on what you wrote I'm going to refrain from commenting in this ticket further (as for me it can be closed) and I'm going to:

  • Not touch /gutenberg/build/core-blocks/theme.css styles.
  • Create .wp-block-my-custom-version-of-table class for alternative styling with regular display: table; which I'll be assigning to the tables that I need to have display: table; for.

@jasmussen
Copy link
Contributor

That sounds like a good approach!

Closing for now but we can always reopen if there are issues with the opinionated style. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Question Questions about the design or development of the editor.
Projects
None yet
Development

No branches or pull requests

3 participants