Skip to content

Commit

Permalink
Add variable for heading size.
Browse files Browse the repository at this point in the history
  • Loading branch information
marvel-uiuc committed Sep 3, 2024
1 parent 8264575 commit 857f56b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
7 changes: 6 additions & 1 deletion builder/versions/ilw-card.1.0.0-alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,12 @@
{
"name": "--ilw-card--font-size",
"depreciated": false,
"description": "Card text font size [default: 1.2em]"
"description": "Card text font size [default: 1.2rem]"
},
{
"name": "--ilw-card--heading--font-size",
"depreciated": false,
"description": "Font size for a card's heading [default: 1.45em]"
},
{
"name": "--ilw-card--icon-width",
Expand Down
14 changes: 13 additions & 1 deletion src/ilw-card.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
--ilw-card--content-padding-right: 2rem; /*var: Right padding around main content in the card*/
--ilw-card--content-padding-bottom: 2rem; /*var: Bottom padding around main content in the card*/
--ilw-card--content-padding-left: 2rem; /*var: Left padding around main content in the card*/
--ilw-card--font-size: 1.2em; /*var: Card text font size*/
--ilw-card--font-size: 1.2rem; /*var: Card text font size*/
--ilw-card--heading--font-size: 1.45em; /*var: Font size for a card's heading*/
--ilw-card--icon-width: 120px; /*var: Limit for an icon's width*/
--ilw-card--icon-height: 80px; /*var: Limit for an icon's height*/
--ilw-card--orange-1: #fd890e;
Expand Down Expand Up @@ -257,6 +258,7 @@ ilw-card {
& > h5,
& > h6 {
color: var(--ilw-card--heading-color);
font-size: var(--ilw-card--heading--font-size);

&:first-of-type {
margin-top: 0;
Expand Down Expand Up @@ -325,6 +327,12 @@ ilw-card {
}
}
}

> [slot=image] {
img {
display: block;
}
}
}

ilw-card[clickable] {
Expand All @@ -342,6 +350,10 @@ ilw-card[clickable] {
}
}

ilw-card[aspect-ratio] > [slot=image] {

}

/* Make il icons color currentColor in cards */
ilw-card path.cls-1 {
fill: currentColor;
Expand Down

0 comments on commit 857f56b

Please sign in to comment.