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

Table cells shouldn't use fixed pixel widths #4027

Closed
maddisondesigns opened this issue Dec 15, 2017 · 8 comments
Closed

Table cells shouldn't use fixed pixel widths #4027

maddisondesigns opened this issue Dec 15, 2017 · 8 comments
Labels
[Feature] Blocks Overall functionality of blocks [Type] Bug An existing feature does not function as intended
Milestone

Comments

@maddisondesigns
Copy link

maddisondesigns commented Dec 15, 2017

Issue Overview

The html for the table block is using pixels for the width of the cells. You should never specify a width using a fixed number of pixels. It should be using percentages.

screenshot_553

This just shows one of the many issues with using pixels widths to resize table cells...

screenshot_555

Steps to Reproduce (for bugs)

  1. Insert table block
  2. Insert new column
  3. View table html

Expected Behaviour

I would expect the table cell widths to be using percentages, not fixed pixel widths

Current Behaviour

Table html is using pixels to specify the width of the cells rather than percentages

Gutenberg 1.9.1
Firefox Quantum 57.0.1 (64-bit)

@danielbachhuber danielbachhuber added [Type] Bug An existing feature does not function as intended [Feature] Blocks Overall functionality of blocks labels Jan 23, 2018
@danielbachhuber
Copy link
Member

@maddisondesigns How did you end up with variable width columns? I don't see any corresponding controls:

image

I can verify widths are included in the markup:

image

@maddisondesigns
Copy link
Author

@danielbachhuber I presume you found the answer to your question in my other issue that I raised (#4026). They're different sizes in my example, because the block doesn't work properly and resize the columns automatically. The fact that there's also no controls to help you resize columns is equally annoying.

@danielbachhuber
Copy link
Member

I presume you found the answer to your question in my other issue that I raised

Indirectly, yes.

They're different sizes in my example, because the block doesn't work properly and resize the columns automatically. The fact that there's also no controls to help you resize columns is equally annoying.

Yeah, weird behavior.

@karmatosed karmatosed added this to the Merge Proposal milestone Jan 25, 2018
@helen
Copy link
Member

helen commented Feb 2, 2018

Possibly related - while I wasn't getting pixel widths defined on the front end, the whole layout was messed up because there's display: block on .wp-block-table. Table CSS is fragile, changing that from the default of display: table seems like a bad idea.

@ZebulanStanphill
Copy link
Member

I think this is fixed now.

@maddisondesigns
Copy link
Author

@SuperGeniusZeb Nope, it's not fixed yet. Just updated to Gutenberg 3.1.1 and inserted a new table and it's still producing fixed width pixels in the markup. The columns also still don't auto-resize themselves when you insert a new column.

screenshot_709

@ZebulanStanphill
Copy link
Member

@maddisondesigns Have you tested in master? I did not see any fixed pixel widths when I tested there.
image

@karmatosed
Copy link
Member

Closing as bringing into a master issue : #6923

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

5 participants