Skip to content

Commit

Permalink
docs: update readme with carbon optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
bogy0 authored Jul 15, 2020
1 parent f565c9c commit a8c0010
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/with-carbon-components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,12 @@ yarn dev
```

Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).

## Optimizations
In this example we import carbon components in the `styles/custom-theme.scss` file like this:
@import '~carbon-components/scss/globals/scss/styles.scss';

When we start to consider the performance of this approach, however, it becomes clear that this will include every single bit of CSS that Carbon outputs. Sometimes, you totally need everything that the project provides, but for a good number of teams you may find yourself using only a subset of our components. Here is a great article about how you can optimize your application using carbon components:
https://medium.com/carbondesign/minimal-css-with-carbon-b0c089ccfa71


0 comments on commit a8c0010

Please sign in to comment.