-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from linuxfoundation/IN-152-typography-rules
added typography rules
- Loading branch information
Showing
6 changed files
with
894 additions
and
684 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
/*! | ||
* Copyright The Linux Foundation and each contributor to LFX. | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
body { | ||
color: #282e32 | ||
color: #282e32; | ||
} | ||
|
||
.primary { | ||
color: #282e32; | ||
.primary { | ||
color: #282e32; | ||
} | ||
|
||
|
||
.secondary { | ||
color: #808b91; | ||
.secondary { | ||
color: #808b91; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,64 @@ | ||
/*! | ||
* Copyright The Linux Foundation and each contributor to LFX. | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
body { | ||
font-family: Open Sans, Roboto Slab, sans-serif; | ||
html { | ||
// resetting the font-size | ||
font-size: 100%; // 16px | ||
} | ||
|
||
.page-title { | ||
font-size: 22px; | ||
body, | ||
span, | ||
p, | ||
a { | ||
font-family: | ||
Open Sans, | ||
sans-serif; | ||
font-size: 0.875rem; | ||
font-weight: 400; | ||
line-height: 1rem; | ||
} | ||
|
||
small { | ||
// marked as body2 in figma | ||
font-family: "Open Sans", sans-serif; | ||
font-size: 0.688rem; | ||
font-weight: 400; | ||
font-size: 0.875rem; | ||
} | ||
|
||
h1 { | ||
font-family: "Roboto Slab", sans-serif; | ||
font-size: 1.375rem; | ||
font-weight: 700; | ||
line-height: 1.625rem; | ||
} | ||
|
||
h2 { | ||
font-family: "Roboto Slab", sans-serif; | ||
font-size: 1.125rem; | ||
font-weight: 600; | ||
line-height: 1.375rem; | ||
} | ||
|
||
h3 { | ||
font-family: "Open Sans", sans-serif; | ||
font-size: 1rem; | ||
font-weight: 600; | ||
line-height: 1.125rem; | ||
} | ||
|
||
h4 { | ||
font-family: "Open Sans", sans-serif; | ||
font-size: 0.875rem; | ||
font-weight: 600; | ||
line-height: 1rem; | ||
} | ||
|
||
.section-title { | ||
font-size: 18px; | ||
h5 { | ||
font-family: "Open Sans", sans-serif; | ||
font-size: 0.75rem; | ||
font-weight: 600; | ||
line-height: 0.875rem; | ||
} |
84 changes: 84 additions & 0 deletions
84
projects/lfx-component-lib/src/lib/themes/typography.stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import { Meta, StoryObj } from '@storybook/angular'; | ||
|
||
const meta: Meta = { | ||
title: 'LFX Components/Themes/Typography', | ||
tags: ['autodocs'], | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj; | ||
|
||
export const BodyText: Story = { | ||
render: () => ({ | ||
template: ` | ||
<p>This is a paragraph of body text. It uses Open Sans, sans-serif font with a size of 0.875rem (14px) and line height of 1rem (16px).</p> | ||
`, | ||
}), | ||
}; | ||
|
||
export const SmallText: Story = { | ||
render: () => ({ | ||
template: ` | ||
<small>This is small text, also known as body2 in Figma. It uses Open Sans, sans-serif font with a size of 0.875rem (14px).</small> | ||
`, | ||
}), | ||
}; | ||
|
||
export const Heading1: Story = { | ||
render: () => ({ | ||
template: ` | ||
<h1>This is a Heading 1</h1> | ||
<p>It uses Roboto Slab, sans-serif font with a size of 1.375rem (22px) and line height of 1.625rem (26px).</p> | ||
`, | ||
}), | ||
}; | ||
|
||
export const Heading2: Story = { | ||
render: () => ({ | ||
template: ` | ||
<h2>This is a Heading 2</h2> | ||
<p>It uses Roboto Slab, sans-serif font with a size of 1.125rem (18px) and line height of 1.375rem (22px).</p> | ||
`, | ||
}), | ||
}; | ||
|
||
export const Heading3: Story = { | ||
render: () => ({ | ||
template: ` | ||
<h3>This is a Heading 3</h3> | ||
<p>It uses Open Sans, sans-serif font with a size of 1rem (16px) and line height of 1.125rem (18px).</p> | ||
`, | ||
}), | ||
}; | ||
|
||
export const Heading4: Story = { | ||
render: () => ({ | ||
template: ` | ||
<h4>This is a Heading 4</h4> | ||
<p>It uses Open Sans, sans-serif font with a size of 0.875rem (14px) and line height of 1rem (16px).</p> | ||
`, | ||
}), | ||
}; | ||
|
||
export const Heading5: Story = { | ||
render: () => ({ | ||
template: ` | ||
<h5>This is a Heading 5</h5> | ||
<p>It uses Open Sans, sans-serif font with a size of 0.75rem (12px) and line height of 0.875rem (14px).</p> | ||
`, | ||
}), | ||
}; | ||
|
||
export const AllTypography: Story = { | ||
render: () => ({ | ||
template: ` | ||
<h1>Heading 1</h1> | ||
<h2>Heading 2</h2> | ||
<h3>Heading 3</h3> | ||
<h4>Heading 4</h4> | ||
<h5>Heading 5</h5> | ||
<p>This is a paragraph of body text.</p> | ||
<small>This is small text (body2).</small> | ||
`, | ||
}), | ||
}; |
Oops, something went wrong.