Skip to content

Commit

Permalink
feat: add component styling conventions documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
willopez committed Jul 19, 2018
1 parent ed782c9 commit 0d3ebac
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
- [Creating a New Version of a Component](./creating-new-component-version.md)
- [Component Development Guidelines](./component-development-guidelines.md)

## Component Styling Conventions

- [Styling Conventions](./styling-conventions.md)

## Component Review process

- [Reviewing Components](./reviewing-components.md)
Expand Down
12 changes: 12 additions & 0 deletions docs/styling-conventions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Component Styling Conventions

### Summary
By convention visual and text styles should be baked into each component. This means that a containing element should set the font-family, font-weight, font-size etc. This convention will make it easier to integrate components into the Reaction Starter Kit and other environments. Further, style values should be retrieved from the theme as seen in the example below.

```
const Del = styled.del`
color: ${applyTheme("color_disabled")};
font-family: ${applyTheme("font_family")};
font-size: ${applyTheme("font_size_small")};
`;
```

0 comments on commit 0d3ebac

Please sign in to comment.