fix: found that macro name was nasty. Also my team starts a production with sabry, so lets call it release
This commit is contained in:
parent
47486415bf
commit
40e4d368cf
1 changed files with 50 additions and 50 deletions
28
README.md
28
README.md
|
|
@ -25,7 +25,7 @@ At first, I'll show how this crate "tastes". With SABRY, its in your power to:
|
|||
Write arbitrary SASS/SCSS code and ship it *as a crate* however you please: with modules, with feature flags, etc. Say "bye" to manual copying, cli-tools and consts.
|
||||
|
||||
```rust
|
||||
sabry::sassy!(tokens {"@mixin colored{color: red;}"});
|
||||
sabry::scssy!(tokens {"@mixin colored{color: red;}"});
|
||||
```
|
||||
|
||||
</td>
|
||||
|
|
@ -146,10 +146,10 @@ sabry = {version = "0.0.1"}
|
|||
And a proc-macro
|
||||
```rust
|
||||
// lib.rs
|
||||
use sabry::sassy;
|
||||
use sabry::scssy;
|
||||
|
||||
sassy!(mixins "tests/assets/mixin-module.scss");
|
||||
sassy!(styles {"
|
||||
scssy!(mixins "tests/assets/mixin-module.scss");
|
||||
scssy!(styles {"
|
||||
$primary-color: black;
|
||||
@mixin colored($col: primary) {
|
||||
@if $col == primary {
|
||||
|
|
@ -290,7 +290,7 @@ use leptos::prelude::*;
|
|||
use sabry::styly;
|
||||
|
||||
styly!(scope {"
|
||||
// assuming we have tokens!() macro generated by `sassy!`, which is handled by `buildy`
|
||||
// assuming we have tokens!() macro generated by `scssy!`, which is handled by `buildy`
|
||||
@use 'tokens';
|
||||
h1 {
|
||||
@include tokens.sectionhead();
|
||||
|
|
@ -427,9 +427,9 @@ For example `{ie = "9", saf_ios = "13.2"}` will try to generate CSS supported on
|
|||
|
||||
## Detailed guide
|
||||
|
||||
### Style definition with `sassy!`
|
||||
### Style definition with `scssy!`
|
||||
|
||||
The `sassy!` macro is available with *procmacro* feature which is enabled by default.
|
||||
The `scssy!` macro is available with *procmacro* feature which is enabled by default.
|
||||
|
||||
It does accept the following syntax: `$name(:$syntax)? ({ $code })|($filename)`, where
|
||||
|
||||
|
|
@ -440,13 +440,13 @@ It does accept the following syntax: `$name(:$syntax)? ({ $code })|($filename)`,
|
|||
|
||||
Examples:
|
||||
```rust
|
||||
use sabry::sassy;
|
||||
use sabry::scssy;
|
||||
|
||||
sassy!(module1 {"$primary-color: red;"});
|
||||
sassy!(module2 "tests/assets/mixin-module.scss");
|
||||
sassy!(module3:sass "tests/assets/mixin-module.sass");
|
||||
scssy!(module1 {"$primary-color: red;"});
|
||||
scssy!(module2 "tests/assets/mixin-module.scss");
|
||||
scssy!(module3:sass "tests/assets/mixin-module.sass");
|
||||
// works, but there are catches.
|
||||
sassy!(module4:sass {"
|
||||
scssy!(module4:sass {"
|
||||
@mixin colored($col: primary)
|
||||
@if $col == primary
|
||||
color: white
|
||||
|
|
@ -457,7 +457,7 @@ sassy!(module4:sass {"
|
|||
|
||||
You may omit the syntax specifier - sabry uses SCSS as the default one.
|
||||
|
||||
The given code to `sassy!` is not checked to be valid code in given syntax (wip).
|
||||
The given code to `scssy!` is not checked to be valid code in given syntax (wip).
|
||||
|
||||
> SASS support inside of rust files is experimental. If you do want to use SASS tabbed syntax - consider to use files path instead of sass-in-rust option.
|
||||
|
||||
|
|
@ -590,7 +590,7 @@ sabry::buildy(
|
|||
)?;
|
||||
```
|
||||
|
||||
Exactly this kind of macros is produced by [`sassy!`](#style-definition-with-sassy).
|
||||
Exactly this kind of macros is produced by [`scssy!`](#style-definition-with-scssy).
|
||||
|
||||
### Scoping
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue