Skip to content

Commit ec7fec4

Browse files
Merge pull request #214 from ember-learn/typography-color-improvements
improve typography and color docs
2 parents 22169d3 + 6433025 commit ec7fec4

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed

addon/styles/global.css

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@
1010
--color-danger: #FFD8E1;
1111
--color-warning: #FCFFC9;
1212
--color-info: #E3EEFC;
13+
1314
--text-preset-1: 1.5rem;
14-
--text-preset-2: 2.5rem;
15-
--text-preset-3: 4rem;
16-
--text-preset-4: 6rem;
17-
--text-preset-5: 8rem;
15+
--text-preset-2: 2.25rem;
16+
--text-preset-3: 3.375rem;
17+
--text-preset-4: 5.063rem;
18+
--text-preset-5: 7.594rem;
19+
1820
--font-weight-1: 300;
1921
--font-weight-2: 400;
2022
--font-weight-3: 600;

addon/styles/typography.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@
7171
font-size: var(--text-preset-5);
7272
}
7373

74+
h1, h2, h3 {
75+
margin-bottom: var(--spacing-1);
76+
}
77+
78+
p {
79+
margin-bottom: var(--spacing-2);
80+
}
81+
7482
.light {
7583
font-weight: var(--font-weight-1);
7684
}

docs/concepts/colours.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Colours
22

3-
### Here we talk about the color scheme
3+
### Usage
4+
#### Legibility
5+
Website elements like text and icons should meet accesibility standards when used against colored backgrounds. The following swatches contain a sample of each of the primary palette colors, along with recommendations for its usage and the acceptable contrast guidelines when coupled with text.
46

57
## Primary Colours
6-
The primary palette is applied across every page of the website and contains the brand, accent and neutral colours. The purpose of the primary palette is to keep uniformity across all pages while encouraging accessibility best practices.
7-
8-
The following swatches contain a sample of each of the primary palette colours, along with recommendations for its usage and the acceptable contrast guidelines when coupled with text.
8+
The primary palette is applied across every page of the website and contains the brand, accent and neutral colors. The purpose of the primary palette is to keep uniformity across all pages while encouraging accessibility best practices.
99

1010
<div class="layout-grid">
1111
<ColorPallet class="col-2-large" @color="#1A1A1A" @name="Dark Gray" @variable="--color-dark" @class-name="bg-dark" />
@@ -17,7 +17,7 @@ The following swatches contain a sample of each of the primary palette colours,
1717
<ColorPallet class="col-2-large" @color="#FFFFFF" @name="Light" @variable="--color-light" @class-name="bg-light"/>
1818
</div>
1919

20-
## Secondary Colours
20+
## Secondary Colors
2121
The secondary palette is applied to UI elements and it's not part of the base colors. The purpose of the secondary palette is to ensure the readability, usability, and accessibility of all UI elements and enhance the communication of actions, changes in state, or errors.
2222

2323
<div class="layout-grid">

docs/concepts/typeography.md renamed to docs/concepts/typography.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Typography
22

3-
## Sizes
3+
### Usage
4+
#### Legibility
5+
Text legibility is primarily affected by color. All text on the website should comply with the Web Content Accessibility Guidelines (WCAG 2.0) Level AA requirements.
6+
7+
Please refer to the <a href="colours">Colors</a> section for more information on color contrast and accessibility.
8+
9+
### Sizes
410

511
Use `.xsmall` for small headings or notice paragraphs.
612

0 commit comments

Comments
 (0)