diff --git a/documentation/docs/97-best-practices/10-best-practices.md b/documentation/docs/97-best-practices/10-best-practices.md index 88c4094fa9..19399a6a4f 100644 --- a/documentation/docs/97-best-practices/10-best-practices.md +++ b/documentation/docs/97-best-practices/10-best-practices.md @@ -91,9 +91,9 @@ Every snippet created as a child of a component will be automatically passed as Read [the `@attach` docs](/docs/svelte/@attach) for documentation on using the imperative DOM API with elements in a Svelte component. -## Use dynamic variables in css +## Using JavaScript variables in CSS -If you have a JS variable that you want to use inside CSS you can do so by using the `style:` directive. +If you have a JS variable that you want to use inside CSS you can do so with the `style:` directive. ```svelte
@@ -103,7 +103,7 @@ this will add a style attribute with the `--columns:` variable that you can use ## Dynamic classes -Since `svelte@5.16.0` you can use `clsx` style directly in the `class` attribute of an element +Since `svelte@5.16.0` you can use `clsx` styles directly in the `class` attribute of an element. This means that arrays and objects can be used to declaratively define classes for an element without having to do manual string concatenation. ```svelte