Skip to content

Commit a86c196

Browse files
authored
Update README.md
Mention the new @scope at-rule
1 parent c9f5a13 commit a86c196

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,10 @@ This function is the easiest way to set up webpack loaders for __css and scoped
9393
### WebpackCssScopeLoader options
9494
* `componentId: string` - Required (only if using the loader directly). A unique ID to identify the scope/component.
9595
* `attribute: string = "data-style"` - Specifies what attribute will be used to identify the scope.
96-
* `scopeEnd: "scope"|"tree" = "scope"` - Specify where the scope ends:
96+
* `scopeEnd: "scope"|"tree" = "scope"` - Specifies where the scope ends:
9797
- `scope` - The default. Using this setting, the scope ends where another scope begins. That is - the styles of the parent scope do not "leak" into the children that have their own scope. This is done using complex css selectors, so performance may be decreased. **Note: some css properties may still affect the children scope if they're inherited (ex. font, color, etc.)!**
9898
- `tree` - The scope continues until the very bottom of the DOM. Styles of the parent scope may affect elements in the lower/deeper scopes.
99+
- As from v0.2.0, this setting may be overwritten in individual files by using the `@scope` directive at the very top. Both `@scope tree;` and `@scope scope;` are valid.
99100

100101
### WebpackScopedCssModulesLoader options
101102
* `componentId: string` - Required. A unique ID to identify the scope/component. It must be the same as the `componentId` provided to the WebpackCssScopeLoader for each file.

0 commit comments

Comments
 (0)