Giter Club home page Giter Club logo

Comments (14)

badsyntax avatar badsyntax commented on August 28, 2024

Hey there, thanks for reporting this issue, and sorry for the belated response. This appears to be an issue with Sass and not with your derpness ;) I'm gonna put a test case together and file a bug report on the Sass repo.

from sassbeautify.

Fequois avatar Fequois commented on August 28, 2024

Ah, I feel better now. :)

It's a function from the Foundation 5 "framework" if that helps you build a test case. Let me know if you need more details!

from sassbeautify.

badsyntax avatar badsyntax commented on August 28, 2024

Thanks! Here's a simple test case that demonstrates the issue:

@mixin fancy-mixin($max-width: 100%) {
  max-width: $max-width;
}
.hello {
  @include fancy-mixin($max-width: 200px);
}

from sassbeautify.

Fequois avatar Fequois commented on August 28, 2024

Yup, can confirm the issue with that too.

from sassbeautify.

badsyntax avatar badsyntax commented on August 28, 2024

I've created an issue here: sass/sass#1096

from sassbeautify.

Fequois avatar Fequois commented on August 28, 2024

Let's see how this goes then! :)

from sassbeautify.

badsyntax avatar badsyntax commented on August 28, 2024

So it appears that the conversion of the variable should not affect the compilation as underscores and dashes are treated the same in Sass.

IMO this is still a bug with sass-convert, it should not be changing the variable names. I'll update this ticket and the README when I get more information from the sass devs.

from sassbeautify.

Fequois avatar Fequois commented on August 28, 2024

It's clearly a bug, and it obviously breaks tools that incorporate Sass. Unfortunately I haven't the knowledge to submit a pull req.

Thanks for looking this up though, and let's hope they'll get around fixing it. :)

from sassbeautify.

badsyntax avatar badsyntax commented on August 28, 2024

Not sure how it would break tools that incorporate sass. Those tools should be aware that underscores and dashes in variables are treated the same. I don't agree with this Sass "feature" but its been part of Sass for a while now and very unlikely to change.

from sassbeautify.

Fequois avatar Fequois commented on August 28, 2024

Well, not directly, but in my example scenario:

Use SassBeautify > variable name changes > CodeKit (which I use to compile my Sass) can't find the variable and fails compilation.

Come to think of it, that's probably something I should mention to CodeKit instead.

from sassbeautify.

badsyntax avatar badsyntax commented on August 28, 2024

This is now fixed in sass, hopefully to be released soon. I'll update this issue when its released.

from sassbeautify.

badsyntax avatar badsyntax commented on August 28, 2024

Looks like this fix is merged into stable for the 3.3.0 release.

When you've got a chance can you test this with Sass 3.3.0 and close the ticket if it works?

from sassbeautify.

Fequois avatar Fequois commented on August 28, 2024
@mixin fancy-mixin($max-width: 100%) {
  max-width: $max-width;
}
.hello {
  @include fancy-mixin($max-width: 200px);
}

turns into

@mixin fancy-mixin($max-width: 100%) {
    max-width: $max-width;
}

.hello {
    @include fancy-mixin($max_width: 200px);
}

and produces this error in CodeKit 2 which uses Sass 3.3.0rc6:

test.scss:6: error: mixin fancy-mixin has no parameter named $max_width

It's possible this issue was fixed in a version later than rc6, but I remember seeing the commit much earlier. I don't know if I'm doing something wrong, so if you can confirm it working on your end feel free to close the issue.

from sassbeautify.

badsyntax avatar badsyntax commented on August 28, 2024

I've just tested with 3.3.3 and this issue is resolved. The hyphen does not get converted to an underscore anymore. When you've got a chance, it would be appreciated if you could test your side with the latest stable. Closing...

from sassbeautify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.