Skip to content

Commit

Permalink
fix(panel): add correct heading and description line height and align…
Browse files Browse the repository at this point in the history
…ment (#10944)

**Related Issue:**
[#9862](#9862)

## Summary

Update `panel` to:

- Use `calcite-font-line-height-relative-snug` as `heading` and
`description`'s line height.
- Vertically center the header's content when only `heading` or
`description` are used.
  • Loading branch information
aPreciado88 authored Dec 3, 2024
1 parent 2961ba5 commit 0d295b8
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions packages/calcite-components/src/components/panel/panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@

.header-content {
.heading {
@apply text-n1h;
font-size: var(--calcite-font-size--1);
}

.description {
@apply text-n2h;
font-size: var(--calcite-font-size--2);
}
}
}
Expand All @@ -59,11 +59,11 @@

.header-content {
.heading {
@apply text-0h;
font-size: var(--calcite-font-size-0);
}

.description {
@apply text-n1h;
font-size: var(--calcite-font-size--1);
}
}
}
Expand All @@ -74,11 +74,11 @@

.header-content {
.heading {
@apply text-1h;
font-size: var(--calcite-font-size-1);
}

.description {
@apply text-0h;
font-size: var(--calcite-font-size-0);
}
}
}
Expand Down Expand Up @@ -145,16 +145,19 @@
py-3.5;

margin-inline-end: auto;
justify-content: center;

.heading,
.description {
@apply block
break-words
p-0;
flex-none
break-words
p-0;
line-height: var(--calcite-font-line-height-relative-snug);
}

.heading {
@apply mx-0 mt-0 mb-1 font-medium;
@apply font-medium;
color: var(--calcite-panel-heading-text-color, var(--calcite-color-text-1));

&:only-child {
Expand Down

0 comments on commit 0d295b8

Please sign in to comment.