-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Towards 1.0 #77
Comments
Adding media queries level 4 to this — |
@jhpratt What version of You can try your example in a playground here. Perhaps you have an old version (prior to |
For some reason I didn't even consider that 🤦 I'm using it indirectly through Zola, and it turns out I'm using a slightly older version of that (which doesn't even rely on Sorry for the mixup! |
Was poking around the repo but figured I'd ask here: would source mapping be a reasonable feature to add at some point? I haven't seen any mention of it so I'm not sure if this is undesired or just hasn't been considered yet. |
@clarfonthey Good question. Definitely something I've thought about before and have done some cursory research into. Generating source maps is a feature I would like to support but haven't had any time to start implementing. If you can share more about your use case I could potentially prioritize it. So far no one has asked for source map support explicitly, and sass-rs (libsass bindings in rust) to my knowledge has never supported source maps so I assume it's a decently niche use case for this library, though I absolutely see the utility and think it would be a fun feature to work on. |
That's very fair. In my case, I was thinking even something simple like being able to tell what specific file a rule came from is helpful, since @import will mix that up. It's definitely very difficult to make work, though. |
grass
is very close to completion and is approaching a 1.0 release. The API is stable and there are very few deviations from the reference implementation.That said, there is still a bit of work to be done before I would want to call
grass
fully feature-complete and having full parity with the reference implementation. In its current state I would argue thatgrass
is suitable for virtually all users of Sass, though there are still a few pieces missing.This is a rough outline of my thoughts for what to work on next for this project. A large part of the remaining work is to catch up with the new features
dart-sass
has added in the last year or so.The Module System
@use
and@forward
have a really surprising level of depth and complexity. Right now very few Sass projects use the module system, but as people move away fromlibsass
, I expect that number to increase. There are a large number of failing spec tests related to this and I'm aware of at least 1 project that fails to compile due to its mixing of@import
,@use
, and@forward
. This bullet is just to solve all of the remaining failing spec testsAPI
grass
hasn't had a breaking change to its rust API in well over 2 years, and the API that exists currently is resilient to breaking changes. I consider this section largely feature complete, and unless new features are requested,grass
will retain the same API it has currently in a1.0
version.I may want to add the ability to further configure
grass::include!
output options, but it should be possible to do so in a backwards-compatible way.Features that rely on the internals of
grass
, such as Sass functions written in rust or AST traversal can be built through the internals crategrass_compiler
.Cosmetics
We differ from
dart-sass
in a number of ways that don't affect the semantics of the output, but do affect the byte-for-byte equality of the output. For the purposes of automated diffing, it would be nice to resolve these differences. Additionally, there are some places where I thinkgrass
can improve on things like error messages and error spans.a { /**/ }
should emita { /**/ }
. This is a featuredart-sass
has added in the last few monthsa > > b {}
should not be emitted. This is again a very recent addition todart-sass
@import
rules above loud comments that were declared above them--foo: ...
)dart-sass
, though does not affect semanticsNaN
, we do not printNaN
's unit@media
indentation bug that we had been emulating, so we should update our code as wellDevops
bulma
in CIbootstrap
in CIdart-sass
differential fuzzing.grass
is already quite regularly fuzzed for crashes, but differential fuzzing would let us find other kinds of bugsPerformance
I've implemented benchmarking in connorskees/sass-perf.
grass
is ~2x faster thandart-sass
for all but 1 benchmark. I have a branch currently that improves SassMaps to make them proper hash maps with amortized constant time lookup and insertion. This doesn't fully fix performance issues on this benchmark, but does bring us a little bit closer. The remaining work here isRc
/Arc
Rc
/Arc
An exploration into using Arc/Rc for all values improved performance on bootstrap by about 20-50%.
General compatibility
These are real issues that can affect the semantics of the outputted CSS or cause errors/crashes on valid input. In general, these are extremely rare issues that do not come up very often in practice, but they should be resolved before a final release
@extend
and selector changes have been made indart-sass
that we need to emulateinspect(..)
dart-sass
. Rust's stdlib float formatter is insufficient for our needsMisc
random
featurecommandline
in default features. Unfortunately seems blocked on Adddefault
features for each [[bin]] rust-lang/cargo#10409 in order to not make this a breaking changeFuture dart-sass compatibility
This section is intended to grow as
dart-sass
adds new features. As part of maintaining grass, new features and bug fixes must be periodically translated fromdart-sass
.dart-sass
)calc
-like functions Calc functions implementation sass/dart-sass#1970The text was updated successfully, but these errors were encountered: