Skip to content

Commit

Permalink
fix(card): expand body instead of header and footer (#1194)
Browse files Browse the repository at this point in the history
* fix(card): expand body instead of header and footer

* Update packages/elements/src/card/index.ts

Co-authored-by: Napat Bualoy <[email protected]>

* Update packages/elements/src/card/index.ts

Co-authored-by: Napat Bualoy <[email protected]>

---------

Co-authored-by: Napat Bualoy <[email protected]>
  • Loading branch information
prima-lseg and bualoy-napat authored Jul 5, 2024
1 parent 932232c commit 160784e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
9 changes: 0 additions & 9 deletions packages/elemental-theme/src/custom-elements/ef-card.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,6 @@
position: relative;
}

[part~='body'] {
overflow: auto;
}

[part~='header'],
[part~='footer'] {
flex: 1 0 auto;
}

[part~='header'] {
padding-bottom: inherit;
min-height: @button-height;
Expand Down
13 changes: 13 additions & 0 deletions packages/elements/src/card/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,26 @@ export class Card extends BasicElement {
display: flex;
flex-flow: column nowrap;
}
[part~='header'] {
display: flex;
}
[part~='header-body'] {
flex: 1;
min-width: 0px;
}
[part~='body'] {
overflow: auto;
flex: 1;
}
[part~='header'],
[part~='footer'] {
flex: 0 0 auto;
}
[part~='footer']:not([part~='has-content']),
[part~='header']:not([part~='has-content']) {
display: none;
Expand Down

0 comments on commit 160784e

Please sign in to comment.