Comments (14)
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.
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.
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.
Yup, can confirm the issue with that too.
from sassbeautify.
I've created an issue here: sass/sass#1096
from sassbeautify.
Let's see how this goes then! :)
from sassbeautify.
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.
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.
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.
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.
This is now fixed in sass, hopefully to be released soon. I'll update this issue when its released.
from sassbeautify.
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.
@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.
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)
- General config file in repo for sharing between developers
- Not working after latest ST3 Update HOT 2
- Option to re-order css properties on beautify HOT 3
- Leading zero HOT 1
- [Errno 2] No such file or directory: 'sass-convert' HOT 7
- Indentation HOT 4
- Extra line between comment and closing bracket HOT 1
- Add missing semicolons automatically rather than sass-convert throwing error
- Double quotes in single quotes are changed on compile
- Simply not working
- it does't work and throw a error 'UnicodeDecodeError'
- UTF-8 not supported
- SassBeautify throwing the following error - No such file or directory 'sass-convert' HOT 9
- Attempting to use BEM methodology Sass breaks formatting
- Ability to set FinalNewline to true HOT 1
- [Errno 2] No such file or directory: 'sass-convert' HOT 2
- Double quotes are changed on compile
- Allow manual use on non .scss/.sass/.css files. HOT 1
- Error
- going insane
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sassbeautify.