Skip to content

Commit

Permalink
fix: app cards only two lines tall (#1505)
Browse files Browse the repository at this point in the history
They should be three liens tall.

Use variables to make cross-file code less magic.
  • Loading branch information
wesleyboar authored Dec 18, 2024
1 parent e76d129 commit 3b59186
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions designsafe/static/styles/app-card.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
padding-inline: 1.5rem;
margin-block: 1.5rem;
}
/* To set height to twice line-height */
/* SEE: ./app-page.css#L34-L36 (circa v7.1.4) */
/* To set explicit height equal to N lines of text */
.s-app-page p.c-app-card__desc {
height: 3.6em;
--lines: 3; /* to override Core-Styles c-app-card truncate */

height: calv(var(--lines) * var(--line-height));
}

/* Types */
Expand Down
4 changes: 3 additions & 1 deletion designsafe/static/styles/app-page.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
}

.s-app-page p {
line-height: 1.8;
--line-height: 1.8; /* variable so app-card.css can use */

line-height: var(--line-height);
}

/* Add more space between Bootstrap columns */
Expand Down

0 comments on commit 3b59186

Please sign in to comment.