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

@ -994,7 +994,7 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
[[package]]
name = "sabry"
version = "0.0.1-alpha.1"
version = "0.0.1-alpha.2"
dependencies = [
"sabry_intrnl",
"sabry_procmacro",
@ -1002,10 +1002,11 @@ dependencies = [
[[package]]
name = "sabry_intrnl"
version = "0.0.1-alpha.1"
version = "0.0.1-alpha.2"
dependencies = [
"base64",
"blake3",
"cfg-if",
"const_format",
"grass",
"lightningcss",
@ -1021,14 +1022,14 @@ dependencies = [
[[package]]
name = "sabry_procmacro"
version = "0.0.1-alpha.1"
version = "0.0.1-alpha.2"
dependencies = [
"sabry_procmacro_impl",
]
[[package]]
name = "sabry_procmacro_impl"
version = "0.0.1-alpha.1"
version = "0.0.1-alpha.2"
dependencies = [
"proc-macro2",
"quote",

View file

@ -2,7 +2,7 @@ use sabry::sassy;
sassy!(style "src/style.scss");
sassy!(utils {
sassy!(utils {"
@mixin flex($direction, $align, $justify, $gap: .5rem) {
display: flex;
list-style: none;
@ -29,9 +29,9 @@ sassy!(utils {
justify-content: $justify;
}
}
});
"});
sassy!(theme {
sassy!(theme {"
$thm-surface-primary: #2b2a29;
$thm-surface-secondary: #6C6C6C;
$thm-surface-tertiary: #4C4C4C;
@ -75,10 +75,10 @@ sassy!(theme {
color: $thm-text-accent;
}
}
});
"});
sassy!(tokens {
@use "theme";
sassy!(tokens {"
@use 'theme';
@mixin clickable($style: accent, $scale: 1.2, $clickscale: 0.9){
@if $style == accent{
@ -103,4 +103,4 @@ sassy!(tokens {
transform: scale($clickscale);
}
}
});
"});