File tree Expand file tree Collapse file tree 1 file changed +41
-2
lines changed
Expand file tree Collapse file tree 1 file changed +41
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ Now you can use `@import "./whatever.css" scoped;`.
2424
2525For example, the following CSS:
2626
27- ``` html
27+ ``` svelte
2828<style>
2929@import "./a.css" scoped;
3030@import "./b.css" scoped;
@@ -35,7 +35,7 @@ For example, the following CSS:
3535
3636will get converted into:
3737
38- ``` html
38+ ``` svelte
3939<style>
4040contents of a.css will be here
4141contents of b.css will be here
@@ -44,5 +44,44 @@ contents of b.css will be here
4444</style>
4545```
4646
47+ ### Select Style Rules by Query Selector
48+
49+ You can select style rules by query selector.
50+
51+ For example, the following CSS and Svelte:
52+
53+
54+ ``` css
55+ /* a.css */
56+
57+ div { color : red ; }
58+
59+ .message { color : blue ; }
60+ ```
61+
62+ ``` svelte
63+ <div> hello </div>
64+ <p class="message"> world </p>
65+
66+ <style>
67+ @import "./a.css?.message" scoped;
68+
69+ div { color: green; }
70+ </style>
71+ ```
72+
73+ will get converted into:
74+
75+ ``` svelte
76+ <div> hello </div>
77+ <p class="message"> world </p>
78+
79+ <style>
80+ .message { color: blue; }
81+
82+ div { color: green; }
83+ </style>
84+ ```
85+
4786## License
4887[ MIT] ( ./LICENSE )
You can’t perform that action at this time.
0 commit comments