Skip to content

Commit

Permalink
docs: add note about 'em' unit on Column#setWidth javadoc (#6317)
Browse files Browse the repository at this point in the history
* docs: add note about 'em' unit on Column#setWidth javadoc

* Update vaadin-grid-flow-parent/vaadin-grid-flow/src/main/java/com/vaadin/flow/component/grid/Grid.java

Co-authored-by: Sergey Vinogradov <[email protected]>

---------

Co-authored-by: Sergey Vinogradov <[email protected]>
  • Loading branch information
DiegoCardoso and vursen authored May 24, 2024
1 parent 2757a87 commit 5b937e8
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,11 @@ public Column<T> setRenderer(Renderer<T> renderer) {

/**
* Sets the width of this column as a CSS-string.
* <p>
* Please note that using the {@code 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 {@code rem} if you need
* a length unit relative to the font size.
*
* @see #setFlexGrow(int)
*
Expand Down

0 comments on commit 5b937e8

Please sign in to comment.