Skip to content

Commit

Permalink
simplify selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
sissbruecker committed Oct 1, 2024
1 parent d72bd1c commit f858fbc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions packages/text-area/theme/lumo/vaadin-text-area-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,15 @@ const textArea = css`
}
/* Use sticky positioning to keep prefix/suffix/clear button visible when scrolling textarea container */
[part='input-field'] ::slotted([slot='prefix']),
[part='input-field'] ::slotted([slot='suffix']),
[part='input-field'] ::slotted([slot$='fix']),
[part='clear-button'] {
position: sticky;
top: 0;
align-self: flex-start;
}
/* Vertically align icon prefix/suffix/clear button with the first line of text */
[part='input-field'] ::slotted(vaadin-icon[slot='prefix']),
[part='input-field'] ::slotted(vaadin-icon[slot='suffix']),
[part='input-field'] ::slotted(vaadin-icon[slot$='fix']),
[part='clear-button'] {
top: calc((var(--lumo-icon-size-m) - 1em * var(--lumo-line-height-s)) / -2);
margin-top: calc((var(--lumo-icon-size-m) - 1em * var(--lumo-line-height-s)) / -2);
Expand Down
3 changes: 1 addition & 2 deletions packages/text-area/theme/material/vaadin-text-area-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ const textArea = css`
}
/* Use sticky positioning to keep prefix/suffix/clear button visible when scrolling textarea container */
[part='input-field'] ::slotted([slot='prefix']),
[part='input-field'] ::slotted([slot='suffix']),
[part='input-field'] ::slotted([slot$='fix']),
[part='clear-button'] {
position: sticky;
top: 0;
Expand Down

0 comments on commit f858fbc

Please sign in to comment.