fix: improve docs

This commit is contained in:
yiffyrusdev 2024-12-14 10:47:55 +05:00 • committed by spushk
commit da9c34ffe5
Signed by: spushk
GPG key ID: 7797B761E105E8AA

View file

@ -372,8 +372,8 @@ fn component() -> impl IntoView {
"Head" "Head"
<img src="whatever"/> <img src="whatever"/>
</h1> </h1>
<ul class=scope::breadcumbs> <ul class="breadcumbs">
<li class=scope::___item(scope::breadcumbs)> <li class="breadcumbs__item">
"Home page" "Home page"
</li> </li>
</ul> </ul>
@ -385,6 +385,7 @@ That will perform *much* better:
- All scope members - like `scope::breadcumbs` - wont contain repeating scope hash, just the original class/id selector - All scope members - like `scope::breadcumbs` - wont contain repeating scope hash, just the original class/id selector
- So instead of scope members (which [aren't](https://github.com/yiffyrusdev/sabry/issues/2) autocompleted for sass-in-the-rust yet) you could just write bare selectors, as you do, for example, with svelte: `<li class="breadcumbs__item">` - So instead of scope members (which [aren't](https://github.com/yiffyrusdev/sabry/issues/2) autocompleted for sass-in-the-rust yet) you could just write bare selectors, as you do, for example, with svelte: `<li class="breadcumbs__item">`
- You'll still have the rusty mod generated: its just the `scope::breadcumbs` is the `"breadcumbs"` without the hash
- You will not encounter [the catch](#scoping) with nested tagname selectors - You will not encounter [the catch](#scoping) with nested tagname selectors
Also, this isn't really exclusive leptos-supporting feature. It just changes scoping behavour. Also, this isn't really exclusive leptos-supporting feature. It just changes scoping behavour.