fix!: bring the scope autocompletion in by changing style input syntax

BREAKING CHANGE: `styly`, `sassy` macros syntax change. Now requires `{"$code"}`.
This commit is contained in:
Yiffy Dev 2024-11-01 09:42:37 +05:00 • committed by spushk
commit ac4a5d5073
Signed by: spushk
GPG key ID: 7797B761E105E8AA
2 changed files with 133 additions and 101 deletions

View file

@ -3,11 +3,11 @@ use sabry::{sassy, usey};
// This module will have the same name as define_styles_example::utils
// and sabry is configured to merge them
sassy!(utils {
sassy!(utils {"
@mixin nonclickable(){
display: none;
}
});
"});
fn main(){
/* Declare modules to use with sabry */

View file

@ -1,7 +1,10 @@
use sabry::styly;
styly!(pub const bundlemod {
@use "tokens";
// Sabry now (0.0.1-alpha.3) disallows unquoted styles
// you won't benefit from unqouted styles though, as you won't get syntax highlighting
// Also, unqouted styles are reserved for future
styly!(pub const bundlemod {"
@use 'tokens';
.someth {
@include tokens.clickable;
background-color: black;
@ -9,7 +12,9 @@ styly!(pub const bundlemod {
background-color: white;
}
}
});
"});
styly!(pub filemod:sass "src/main.sass");
fn main(){
println!("someth class codemod styles: {}", bundlemod::someth);