Skip to content

Commit

Permalink
docs: add note about em unit in the column width jsdoc (#7443)
Browse files Browse the repository at this point in the history
* docs: add note about `em` unit in the column `width` jsdoc

* docs: add mention to the type declaration
  • Loading branch information
DiegoCardoso authored and vaadin-bot committed May 24, 2024
1 parent fb43b2d commit d5436eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/grid/src/vaadin-grid-column-mixin.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ export declare class GridColumnMixinClass<
> extends ColumnBaseMixinClass<TItem, Column> {
/**
* Width of the cells for this column.
*
* Please note that using the `em` length unit is discouraged as
* it might lead to misalignment issues if the header, body, and footer
* cells have different font sizes. Instead, use `rem` if you need
* a length unit relative to the font size.
*/
width: string | null | undefined;

Expand Down
5 changes: 5 additions & 0 deletions packages/grid/src/vaadin-grid-column-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,11 @@ export const GridColumnMixin = (superClass) =>
return {
/**
* Width of the cells for this column.
*
* Please note that using the `em` length unit is discouraged as
* it might lead to misalignment issues if the header, body, and footer
* cells have different font sizes. Instead, use `rem` if you need
* a length unit relative to the font size.
*/
width: {
type: String,
Expand Down

0 comments on commit d5436eb

Please sign in to comment.