You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Modules over Svelte scoping?](#modules-over-svelte-scoping)
26
+
-[Modules over Svelte scoping?](#modules-over-svelte-scoping)
27
27
-[Configuration](#configuration)
28
28
-[Rollup](#rollup)
29
29
-[Webpack](#webpack)
@@ -722,11 +722,15 @@ Cons:
722
722
723
723
- does not pass scoped class name to child components
724
724
725
-
### Modules over Svelte scoping?
725
+
### Modules over Svelte scoping?
726
726
727
-
-**On a full svelte application**: it is just a question of taste as the default svelte scoping is largely enough. Component styles will never inherit from other styling.
727
+
**On a full svelte application**
728
728
729
-
-**On a hybrid project** (like using svelte to enhance a web page): the default scoping may actually inherits from a class of the same name belonging the style of the page. In that case using CSS Modules to create a unique ID and to avoid class inheritance might be advantageous.
729
+
it is just a question of taste as the default svelte scoping is largely enough. Component styles will never inherit from other styling.
730
+
731
+
**On a hybrid project** (like using svelte to enhance a web page)
732
+
733
+
the default scoping may actually inherits from a class of the same name belonging the style of the page. In that case using CSS Modules to create a unique ID and to avoid class inheritance might be advantageous.
Svelte is running the preprocessors by phases, going through all *markup* first, following by *script* and then *style*.
819
+
Svelte is running the preprocessors by phases, going through all *markup* first, followed by *script* and then *style*.
816
820
817
-
The CSS Modules preprocessor is doing all its work on the markup phase via `svelte.parse()`that requires the compoment to be a valid standard svelte component (using vanilla js and vanilla css). It will throw an error if it encounters any other code (such as typescript or sass).
821
+
The CSS Modules preprocessor is doing all its work on the markup phase via `svelte.parse()`which requires the compoment to be a valid standard svelte component (using vanilla js and vanilla css). if any other code (such as typescript or sass) is encountered, an error will be thrown.
As it is extremely common for developers to use `svelte-preprocess` in their application, CSS Modules provides a small utility to easily be incorporated with. `linearPreprocess` will ensure a linear process from the listed preprocessors.
837
+
As it is extremely common for developers to use `svelte-preprocess` in their application, CSS Modules provides a small utility to easily be incorporated with. `linearPreprocess` will ensure a linear process from the list of preprocessors.
0 commit comments