Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jun 10, 2021
1 parent 9fd1074 commit ccc3ab2
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions docs/styling.md
@@ -1,5 +1,33 @@
# Styling

## vanilla-extract

The `@vanilla-extract/css` package is not available out of the box so it needs to be installed.

```bash
$ yarn add @vanilla-extract/css
```

Now you can create `.css.ts` files in your project.

```js
// BigBox.css.ts
import { style } from '@vanilla-extract/css';

export const bigBox = style({ width: 500, height: 500 });
```

```js
// BigBox.tsx
import * as styles from './BigBox.css';

export function BigBox() {
return <div className={styles.bigBox}>I am a big box</div>;
}
```

See [vanilla-extract](https://vanilla-extract.style/documentation/) for full documentation.

## Locally Scoped CSS

(via [CSS Modules](https://github.com/css-modules/css-modules) and [Less](http://lesscss.org/))
Expand All @@ -25,6 +53,8 @@ export default () => <div className={styles.exampleWrapper}>Hello World!</div>;

## treat

> Usage of treat is deprecated in favour of vanilla-extract
Note: You must access all treat imports through the sku prefix. e.g. `sku/treat`, `sku/react-treat`;

See treat's [docs](https://seek-oss.github.io/treat/) for details on proper usage.
Expand Down

0 comments on commit ccc3ab2

Please sign in to comment.