Skip to content

Commit

Permalink
docs: add note about em unit in the column width jsdoc (#7443) (C…
Browse files Browse the repository at this point in the history
…P: 24.4) (#7444)

* docs: add note about `em` unit in the column `width` jsdoc

* docs: add mention to the type declaration

Co-authored-by: Diego Cardoso <[email protected]>
  • Loading branch information
vaadin-bot and DiegoCardoso committed May 24, 2024
1 parent fb43b2d commit 0d0e84a
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 0d0e84a

Please sign in to comment.