rsass icon indicating copy to clipboard operation
rsass copied to clipboard

Release 1.0

Open kaj opened this issue 8 years ago • 16 comments
trafficstars

Tracking issue for rsass 1.0 release criteria.

  • [x] Basic sass constructs.
  • [x] Sass interpolation (#{"foo" + $bar}) in values (pr #2).
    • [x] Sass interpolation in selectors.
    • [x] Sass interpolation in at-rules.
    • [x] Sass interpolation in property names.
  • [x] A way to define functions in Rust and call them from sass (pr #4).
  • [x] Correct string handling / quoting / unquoting.
  • [ ] Module support:
    • [x] Support @use, @import and @foward (issues #60)
    • [x] Support most of the builtin modules
    • [ ] #129
    • [ ] #130
  • [ ] #65
  • [ ] A reasonable amount of success on the sass-spec.
  • [ ] Of course, the release candidate should build successfully on CI (Linux, Windows and Mac)

kaj avatar Apr 28 '17 19:04 kaj

Will widespread CSS/SASS frameworks like Bourbon or ZURB Foundation work with 1.0? Currently these two don't work.

Boddlnagg avatar Jul 12 '17 14:07 Boddlnagg

Will widespread CSS/SASS frameworks like Bourbon or ZURB Foundation work with 1.0? Currently these two don't work.

I don't want to add beeing able to transpile specific frameworks to the release criteria, but it may well be that the missing interpolation is the thing that is lacking for them, and if so, it will work.

One thing that I have not added to the release criteria, but that I want to support as soon as possible, is the selector-likes stop markers that is used for css animations (actually, using keywords from and to already works, but using percentages does not).

kaj avatar Jul 12 '17 20:07 kaj

Okay, I looked at the errors that I get when I try to use Bourbon and Foundation with rsass, and the current blocker actually seems to be the missing interpolation (interpolation in property names for Bourbon and interpolation in media queries for Foundation), though this does not say whether everything will work once that is implemented.

Anyway, thanks for your work on this project!

Boddlnagg avatar Jul 13 '17 09:07 Boddlnagg

I added a bullet point for string quoting / unqouting. I'm considering requiring support for placeholder selectors and @extend directive.

kaj avatar Nov 13 '17 13:11 kaj

Hi, don't forget windows support! Thanks for your initiative!

  • [x] build on appveyor

Geobert avatar May 11 '18 22:05 Geobert

Yes, it "should" build on windows, and I hope there won't be any big problems with that in itself (I think rsass works on windows as-is), but actually having continous verification of that would be a good thing. I'll try to look into it in a week or so. Hints welcome ... :-)

kaj avatar May 12 '18 17:05 kaj

I can give you a config file for appveyor :)

Geobert avatar May 12 '18 18:05 Geobert

Here: https://gist.github.com/Geobert/c3a3ed1c62d4d2f5294a093b36fcd175

Geobert avatar May 12 '18 18:05 Geobert

Appveyor build added and successfull. Thanks for the config file, @Geobert .

kaj avatar May 19 '18 10:05 kaj

A reasonable amount of success on the sass-spec.

Would you please break this down further so we can gauge ongoing progress and work remaining?

naturallymitchell avatar Feb 10 '19 20:02 naturallymitchell

A reasonable amount of success on the sass-spec.

Would you please break this down further so we can gauge ongoing progress and work remaining?

I extracted Support placeholder selectors and the @extend directive as a separate item. Other than that, I don't really know. Also, I think at least issues #41 , #42 and #46 should be resolved.

kaj avatar Feb 11 '19 05:02 kaj

how do the tests look now? (since https://github.com/kaj/rsass/commit/0597e3cb85495a7e62d2df0257da9388ac158f64)

naturallymitchell avatar Jun 12 '19 15:06 naturallymitchell

how do the tests look now? (since 0597e3c)

Pretty similar to how they looked before, only some tests that contained multiple properties testing different aspects of something has been broken up into a set of tests testing one aspect each, as for example https://github.com/kaj/rsass/commit/0597e3cb85495a7e62d2df0257da9388ac158f64#diff-b97f6e13978eef129ce0222c336c6d02

kaj avatar Jun 14 '19 07:06 kaj

@kaj How close would you say it is to usable? I'm looking at alternatives to sass-rs for Zola and there is this library and grass which seem to be at roughly the same stage.

I've tried running the cmd line on the new bootstrap 5 scss files but I get:

Error: $weight: Expected -20 to be within 0 and 100.
    ,
156 |   @return mix(white, $color, $weight);
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    '
    ../../Downloads/bootstrap-5.0.0/scss/_functions.scss 156:11  import
    ../../Downloads/bootstrap-5.0.0/scss/bootstrap-grid.scss 10:9  root stylesheet
    ,
166 |   @return if($weight > 0, shade-color($color, $weight), tint-color($color, -$weight));
    |                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    '
    ../../Downloads/bootstrap-5.0.0/scss/_functions.scss 166:57  import
    ../../Downloads/bootstrap-5.0.0/scss/bootstrap-grid.scss 10:9  root stylesheet
    ,
291 | $link-hover-color:                        shift-color($link-color, $link-shade-percentage) !default;
    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    '
    ../../Downloads/bootstrap-5.0.0/scss/_variables.scss 291:43  import
    ../../Downloads/bootstrap-5.0.0/scss/bootstrap-grid.scss 11:9  root stylesheet

The JS implementation (using dart-sass) from their package.json seem to compile it without errors. Now according to their docs mix should be a value in between 0-100 so the error should be legit. It would useful to vendor a few common Sass libraries and compile them as additional tests. It also gives an idea of which missing feature is commonly used.

Keats avatar May 09 '21 13:05 Keats

After looking at this for a while I realized what happens here: Since the shift-color function uses the if function rather than the @if directive, both its arguments are evaluated. For normal functions, evaluating the arguments before entering the function body is expected, but as the documentation actually mentions the if function is special in that regard. So it needs a special-case implementation, which is a bit ugly but probably not that hard to implement.

kaj avatar May 10 '21 17:05 kaj

As for the more general "use bootstrap and other libraries to find out what to implement next", I have only done so to some extent, but I don't think it's relevant to include that as an actual test case, at least not until it suceeds once manually. :-)

kaj avatar May 10 '21 17:05 kaj