dojo / dojo/widgets

Consider consistent typography approach

Open
#1,552 0 comments 0 reactions 0 assignees View on GitHub
medium medium priority
Dominant language
TypeScript
Stars
92
Forks
63
PR merge metrics
No merged PRs in 30d

Description

**Enhancement**

When writing apps with consistent headings / subheadings etc it may be useful to provide a consistent approach.
This could be accomplished via css modules to be imported where required or by Widgets representing each typography type.

### css-modules

a css file like
```css
.heading1 {
font-size: 28px;
}
.heading2 {
font-size: 20px;
}
```
could be imported and used as such.

```tsx
import * as typography from '@dojo/widgets/typography';

return (
...
Title
Sub Title
...
);
```

### widgets

```tsx
import { Heading1, Heading2 } from '@dojo/widgets/typograhy';

return (
...
Title
Sub Title
...
);
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.