Skip to content

Commit

Permalink
feat(TitleBlockZen): update title font to match composable header (#4772
Browse files Browse the repository at this point in the history
)

* feat(TitleBlockZen): update title font to match composable header

* test(TitleBlockZen): update default breakpoints to be closer to test case edge

* feat(TitleBlockZen): remove breadcrumb breakpoint title font scaling
  • Loading branch information
HeartSquared authored Jun 21, 2024
1 parent 74800f9 commit 9dac69a
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .changeset/forty-games-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@kaizen/components": minor
---

Update TitleBlockZen title font to match composable header.
14 changes: 0 additions & 14 deletions packages/components/src/TitleBlockZen/TitleBlockZen.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -171,17 +171,7 @@ $tab-container-height-medium-and-small-collapsed: 0;
.titleTextOverride.titleTextOverride {
padding: 4px 0;

@media (max-width: $breadcrumb-breakpoint-width) {
font-family: $typography-heading-2-font-family;
font-weight: $typography-heading-2-font-weight;
font-size: $typography-heading-2-font-size;
line-height: $typography-heading-2-line-height;
letter-spacing: $typography-heading-2-letter-spacing;
}

@include title-block-under-1366 {
font-family: $typography-heading-2-font-family;
font-weight: $typography-heading-2-font-weight;
font-size: $typography-heading-2-font-size;
line-height: $typography-heading-2-line-height;
letter-spacing: $typography-heading-2-letter-spacing;
Expand All @@ -190,8 +180,6 @@ $tab-container-height-medium-and-small-collapsed: 0;

.hasLongTitle & {
@include title-block-under-1366 {
font-family: $typography-heading-3-font-family;
font-weight: $typography-heading-3-font-weight;
font-size: $typography-heading-3-font-size;
line-height: $typography-heading-3-line-height;
letter-spacing: $typography-heading-3-letter-spacing;
Expand All @@ -200,8 +188,6 @@ $tab-container-height-medium-and-small-collapsed: 0;
}

@include title-block-medium-and-small {
font-family: $typography-heading-4-font-family;
font-weight: $typography-heading-4-font-weight;
font-size: $typography-heading-4-font-size;
line-height: $typography-heading-4-line-height;
letter-spacing: $typography-heading-4-letter-spacing;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/TitleBlockZen/TitleBlockZen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ export const TitleBlockZen = ({
<div className={styles.titleAndSubtitleInner}>
<div className={styles.title}>
<Heading
variant="heading-1"
variant="composable-header-title"
color={isReversed(variant) ? "white" : "dark"}
classNameOverride={styles.titleTextOverride}
data-automation-id={titleAutomationId}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,60 @@ export const Playground: Story = {
},
}

export const Viewports: Story = {
parameters: {
viewport: {
viewports: {
default: {
name: "Above or equal to 1366",
styles: { width: "1366px", height: "800px" },
type: "desktop",
},
under1366: {
name: "Under 1366",
styles: { width: "1365px", height: "800px" },
type: "desktop",
},
mediumSmall: {
name: "Medium and small",
styles: { width: "1079px", height: "800px" },
type: "desktop",
},
},
defaultViewport: "default",
},
chromatic: {
disable: false,
viewports: [1079, 1365, 1366],
},
},
}

export const HasLongTitle: Story = {
parameters: {
viewport: {
viewports: {
default: {
name: "Above or equal to 1366",
styles: { width: "1366px", height: "800px" },
type: "desktop",
},
under1366: {
name: "Under 1366",
styles: { width: "1365px", height: "800px" },
type: "desktop",
},
},
defaultViewport: "default",
},
chromatic: {
disable: false,
viewports: [1365, 1366],
},
},
args: { title: "A long title with over thirty characters" },
}

export const StickerSheetDefault: Story = {
parameters: {
docs: {
Expand Down

0 comments on commit 9dac69a

Please sign in to comment.