1
0
mirror of https://github.com/thangisme/notes.git synced 2024-10-31 20:37:18 -04:00
notes/docs/ui-components/typography.md

115 lines
3.5 KiB
Markdown
Raw Normal View History

2017-03-09 13:16:08 -05:00
---
layout: default
title: Typography
parent: UI Components
nav_order: 1
---
2017-03-24 09:47:37 -04:00
# Typography
2019-01-14 14:18:09 -05:00
{: .no_toc }
2017-03-24 09:47:37 -04:00
## Table of contents
{: .no_toc .text-delta }
1. TOC
{:toc}
---
## Font stack
By default, Just the Docs uses a native system font stack for sans-serif fonts:
```scss
-apple-system, BlinkMacSystemFont, "helvetica neue", helvetica, roboto, noto, "segoe ui", arial, sans-serif
```
2019-01-14 14:18:09 -05:00
ABCDEFGHIJKLMNOPQRSTUVWXYZ
2017-03-24 09:47:37 -04:00
abcdefghijklmnopqrstuvwxyz
{: .fs-5 .ls-10 .code-example }
2019-01-14 14:32:41 -05:00
For monospace type, like code snippets or the `<pre>` element, Just the Docs uses a native system font stack for monospace fonts:
2017-03-24 09:47:37 -04:00
```scss
"SFMono-Regular", Menlo, Consolas, Monospace
```
2019-01-14 14:18:09 -05:00
ABCDEFGHIJKLMNOPQRSTUVWXYZ
2017-03-24 09:47:37 -04:00
abcdefghijklmnopqrstuvwxyz
{: .fs-5 .ls-10 .text-mono .code-example }
---
## Responsive type scale
2019-01-14 14:32:41 -05:00
Just the Docs uses a responsive type scale that shifts depending on the viewport size.
2017-03-24 09:47:37 -04:00
| Selector | Small screen size `font-size` | Large screen size `font-size` |
|:----------------------|:---------------------------------|:------------------------------|
| `h1`, `.text-alpha` | 32px | 36px |
| `h2`, `.text-beta` | 18px | 24px |
| `h3`, `.text-gamma` | 16px | 18px |
| `h4`, `.text-delta` | 14px | 16px |
| `h5`, `.text-epsilon` | 16px | 18px |
2019-01-14 14:18:09 -05:00
| `h6`, `.text-zeta` | 18px | 24px |
2017-03-24 09:47:37 -04:00
| `body` | 14px | 16px |
---
## Headings
Headings are rendered like this:
<div class="code-example">
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
</div>
```markdown
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
```
---
## Body text
Default body text is rendered like this:
<div class="code-example" markdown="1">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
```markdown
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
```
---
## Inline elements
<div class="code-example" markdown="1">
Text can be **bold**, _italic_, or ~~strikethrough~~.
[Link to another page](another-page).
</div>
```markdown
Text can be **bold**, _italic_, or ~~strikethrough~~.
[Link to another page](another-page).
```
---
## Typographic Utilities
2019-01-14 14:32:41 -05:00
There are a number of specific typographic CSS classes that allow you to override default styling for font size, font weight, line height, and capitalization.
2017-03-24 09:47:37 -04:00
2018-10-23 16:45:08 -04:00
[View typography utilities]({{ site.baseurl }}{% link docs/utilities/utilities.md %}#typography){: .btn .btn-outline }