-
Notifications
You must be signed in to change notification settings - Fork 188
scss #14
Comments
Is a Sass implementation for the current Kube release still on the horizon? Kube seems like the perfect CSS framework to me - lighter than Foundation/Bootstrap, minimal styling, yet very complete and well documented. However I'm really not interested in working with Less in my Rails projects. The less-rails gem seems to depend on the additional overhead of the rubyracer gem, which I'd like to avoid. Kube 4.x in Sass-flavour would be fantastic news. |
Maybe we can use an automated task to convert less to sass/scss instead of manually implementing sass but I'm not sure if it works properly. @thirdsun I came across the following rakefile which converts from less to sass. Maybe it works for you. |
That would be an option - I also considered going this route as it seems to be the most sane option for the moment. However since being anything but a Regex expert I'm always worried if these tasks are reliable and able to catch everything that needs to be changed. Here is another resource that could at least be used for its Regular Expressions: https://github.com/twbs/bootstrap-sass/blob/master/tasks/converter/less_conversion.rb It seems to be Bootstrap's official Less to Sass conversion script - so I'm rather confident that it's complete. |
Regarding SCSS, I've made a pull request ages ago, where I watched all of the changes with Gulp.js, but i had no news back since then.
|
I saw your efforts to get this working as scss, which is why I commented in this thread. However your pull request was for the old 3.x version, right? I think it would be a good a idea to look for a working conversion tool, like a rake task, and maybe try to ask Imperavi to use it for the current and future releases - they may have some interest in offering their framework in 2 flavors and reach a wider audience. |
Have just made a pull request for SCSS converted version 4.0.2. I did it using a combination of regex and manual editing and tested using Compas 1.0.1. It's quite tricky to write regex to automatically convert, I can imagine why there might not be reliable automatic tools out there. After a bit of fiddling though it compiles and very little has changed besides syntax, still would say use at your own risk until it's been properly tested. See: #21 A couple of mixins needed some editing to get it to compile and I've had to comment out the retina-images() mixin because I wasn't sure how it worked to debug. I'll probably replace it with a known working scss alternative when I get time but it's not something I use at the moment. I've not actually tested building a site with it yet, please try it and let me know any issues. |
@mike-source That's a fantastic effort - thank you. I tried to convert it myself over the weekend and, as you mentioned, it's much more complicated than anticipated - lots of manual correcting and fixing required. I'll try your conversion later. However without a real automatic conversion I wonder how sustainable this process is for future Kube releases. |
Thanks, I'd be keen to have someone try it out... and yes I agree its not that sustainable without being automated, but its actually a only few hours work and would be much faster now I've done it once, its not that huge a framework compared to e.g. bootstrap where you can definitely see the need for it to be automated! Whilst the framework is still small its not too big a task to maintain the sass version alongside the less one... would just need someone to keep an eye out for changes in the repo and periodically update them. Not sure @imperavi 's views on losing that bit of flexibility with the project in order to cater to sass as well (although a lot of frameworks seem to be providing less & sass, so its a good feature). Perhaps a separate fork would be more appropriate? I did what I could with find/replace and regex (using patterns I found googling) and then manually corrected what got missed/broke. Using a linter in sublime text for scss helped highlight the errors and it wasn't too tricky to figure out corrections. The most annoying part is the fact mixins in less are called with syntax basically identical to a normal selector in CSS so hard to distinguish. I couldn't think of an automatic way to do this or regex pattern, if someone knows a better method for that part it would be much more feasible. |
Thanks for your detailed explaination. I was going to start a small, simple project at the weekend and Kube seems like a perfect fit - Less was the only barrier. |
I've added a new pull request under "scss", some issues are now fixed, so i closed the old "SaSS" request. If we can merge this folder to master, i can then make a new pull request with an implementation of a npm module for Node.js.
The text was updated successfully, but these errors were encountered: