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

docs-bug(mat-table): Example suggesting to use max-width to set column width is misleading #29294

Open
TangerineCat opened this issue Jun 20, 2024 · 1 comment · May be fixed by #29373
Open
Labels
area: material/table docs This issue is related to documentation P4 A relatively minor issue that is not relevant to core functions

Comments

@TangerineCat
Copy link

Documentation Feedback

The CSS for this example uses the max-width property. However, if you expand the page wide enough, it's clear that this CSS rule doesn't do anything in Chrome, as the computed width of the cell is 72, which is longer than max-width: 64px

Screenshot 2024-06-20 at 12 11 03 PM

AFAIK, the css display: table-cell; does not have a max-width property. This CSS should be removed to avoid confusion and a better example of how to configure max-width should be given.

Affected documentation page

https://material.angular.io/components/table/examples#table-http

@TangerineCat TangerineCat added docs This issue is related to documentation needs triage This issue needs to be triaged by the team labels Jun 20, 2024
@TangerineCat TangerineCat changed the title docs-bug(mat-table): Examples suggest using max-width to change column width is misleading docs-bug(mat-table): Example suggesting to use max-width to set column width is misleading Jun 20, 2024
@andrewseguin
Copy link
Contributor

Yeah it seems just setting width here would be a better example

@andrewseguin andrewseguin added P4 A relatively minor issue that is not relevant to core functions area: material/table and removed needs triage This issue needs to be triaged by the team labels Jun 24, 2024
lindoRR-07 pushed a commit to lindoRR-07/components that referenced this issue Jun 27, 2024
…n width is misleading

The fix is to use the width property instead of max-width since this can be misleading as though the width will never exceed the max-width provided.

Fixes angular#29294
lindoRR-07 added a commit to lindoRR-07/components that referenced this issue Jul 3, 2024
…n width is misleading

The fix is to use the width property instead of max-width since this can be misleading as though the width will never exceed the max-width provided.

Fixes angular#29294
lindoRR-07 added a commit to lindoRR-07/components that referenced this issue Jul 3, 2024
…n width is misleading

The fix is to use the width property instead of max-width since this can be misleading as though the width will never exceed the max-width provided.

Fixes angular#29294
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/table docs This issue is related to documentation P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
2 participants