Skip to content

Commit 481da32

Browse files
authored
docs: fix outdated setup guidance (#1481)
1 parent be435e4 commit 481da32

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ The core team works directly on GitHub and all work is public.
1818

1919
1. Run `pnpm bootstrap` to setup the development environment.
2020

21-
1. When working on the code, you can use the watch mode to watch and compiles changed files:
21+
1. When working on a package, you can use that package's watch script to watch and compile changed files:
2222

2323
```sh
24-
pnpm watch
24+
pnpm --filter @linaria/react watch
2525
```
2626

2727
1. If you've added code that should be tested, add tests.

docs/ATOMIC_CSS.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ Atomic CSS is a way of writing CSS such that each CSS rule has exactly one decla
2828

2929
## Usage in Linaria
3030

31-
Atomic styles can be enabled in the linaria config by providing an `atomizer` function (see [configuration](./CONFIGURATION.md) for details).
32-
33-
Once enabled, it is possible to write atomic styles by importing the `css` template literal from `@linaria/atomic`:
31+
Atomic styles do not require a separate config option. Use them by importing the `css` template literal from `@linaria/atomic`:
3432

3533
```tsx
3634
import { cx } from '@linaria/core';

docs/CONFIGURATION.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ module.exports = {
122122
`;
123123
```
124124
125-
- `classNameSlug: string | ((hash: string, title: string, args: ClassNameSlugVars) => string)` (default: `default`):
125+
- `classNameSlug: string | ((hash: string, title: string, args: ClassNameSlugVars) => string)` (default: generated from the class hash, with the display name prefix when `displayName` is enabled):
126126
127127
Using this will provide an interface to customize the output of the CSS class name. Example:
128128
@@ -154,13 +154,13 @@ module.exports = {
154154
- `hash`: The hash of the content.
155155
- `title`: The name of the class.
156156
157-
- `variableNameSlug: string | ((context: IVariableContext) => string)` (default: `default`):
157+
- `variableNameSlug: string | ((context: IVariableContext) => string)` (default: Linaria-generated variable id):
158158
159159
Using this will provide an interface to customize the output of the CSS variable name. Example:
160160
161161
variableNameSlug: '[componentName]-[valueSlug]-[index]',
162162
163-
Would generate a variable name such as `--Title-absdjfsdf-0` instead of the `@react/styled`'s default `--absdjfsdf-0`.
163+
Would generate a variable name such as `--Title-absdjfsdf-0` instead of the `@linaria/react`'s default `--absdjfsdf-0`.
164164
165165
You may also use a function to define the slug. The function will be evaluated at build time and must return a string:
166166

0 commit comments

Comments
 (0)