Skip to content
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

Why compass? #2368

Closed
whmii opened this issue Jul 14, 2015 · 18 comments
Closed

Why compass? #2368

whmii opened this issue Jul 14, 2015 · 18 comments

Comments

@whmii
Copy link

whmii commented Jul 14, 2015

I'm currently using chosen-rails and am unable to update sass to the current version due to the use of compass in chosen.

I am planning on putting a pr together this evening to remove it, but before I do I wanted to make sure there wasn't a super huge reason that yall were using compass (since it is no longer well maintained and conflicts so directly with current implementations of sass).

🍻

@tjschuck
Copy link
Member

/cc @mlettini

Also, Compass is no longer well-maintained? Do you have any reference to it being abandoned by its maintainers to back that up?

@mlettini
Copy link
Contributor

Also, Compass is no longer well-maintained? Do you have any reference to it being abandoned by its maintainers to back that up?

Also curious of this.

We are currently using Compass for image-url and any @includes. It's been in there awhile. While new browsers probably don't need vendor-prefixed gradients and box-sizing, older browsers and support still do. To be honest, I don't know if Chosen has any written browser requirements...

@tjschuck
Copy link
Member

@mlettini See this code block -- anything that passes it is "supported".

The only desktop browser explicitly not supported is IE less-than 8.

@koenpunt
Copy link
Collaborator

We could switch to node-sass, which uses libsass. Vendor prefixes could be handled by postcss' autoprefixer

@whmii
Copy link
Author

whmii commented Jul 23, 2015

I think rails-sass would be fine. I'd imagine updating existing tech instead of introducing new ones.

@whmii
Copy link
Author

whmii commented Jul 23, 2015

Also, I think that prefixing is better relinquished to a tool like Autoprefixer so that things like prefixing requirements do not effect the sass files themselves. this way you can write the code you want to write and the prefixing is done separately.

@whmii
Copy link
Author

whmii commented Jul 23, 2015

Ah, I missed that yall were using grunt. I have posted a wip branch with some changes to the gruntfile. https://github.com/whmii/chosen/tree/wm-sass-rails

It doesn't seem to want to run any grunt commands right now. I'll debug mañana.

@tjschuck
Copy link
Member

@whmii Actually, this all starts from this, right?

am unable to update sass to the current version due to the use of compass in chosen.

Compass and Sass both are just development dependencies for Chosen -- they're just necessary to build the final CSS from the lib's source. But Chosen's dev dependencies shouldn't affect your ability to run any arbitrary version of Sass and/or Compass.

What problem specifically are you having?

@koenpunt
Copy link
Collaborator

@whmii image-url() and other functions are not supported by node-sass. Although I've created a simple module to support image-url, image-width and image-height. And I planning to implement the other asset functions as well (font-url etc): https://github.com/fetch/node-sass-asset-functions

@whmii
Copy link
Author

whmii commented Jul 23, 2015

Out of curiosity, why are you using the grunt for your stylesheets and not the asset pipeline, since that would allow image-url.
(not trying to call the whole app in to question here, sorry for all the nagging 😥 )

@koenpunt
Copy link
Collaborator

@whmii because using the asset pipeline would make Rails a dependency of Chosen

@tjschuck
Copy link
Member

@whmii I think all of your issues are specifically with chosen-rails, not Chosen itself. All of the dependency conflicts you seem to have are not related to Chosen itself -- its dependencies are just development dependencies. Chosen itself is just some JS and CSS files and a couple of images.

Closing this -- feel free to open another issue over on chosen-rails if you're still having problems.

@AlJohri
Copy link

AlJohri commented Sep 25, 2015

@koenpunt

To aid in the transition away from compass and towards node-sass, perhaps you can use http://bourbon.io/, a "simple and lightweight mixin library for Sass".

All of the mixins being used in the code: box-sizing, user-select, background, and background-image are already included in bourbon:

  • bourbon/bourbon-deprecated-upcoming => box-sizing
  • bourbon/css3/user-select => user-select
  • bourbon/css3/background => background-image
  • bourbon/css3/background-image => background-image

I simply added @import "bourbon/bourbon"; to the top of my chosen.scss file and the sass is compiling just find and rendered content looks identical save the image-url issue mentioned above.

@raldred
Copy link

raldred commented Oct 3, 2015

So as @koenpunt closed my issue and this issue is closed, does that mean harvesthq have deemed this issue wont fix?
You only have to look at their repos of late, they're in a sorry state, failing builds, few commits.

@tjschuck
Copy link
Member

tjschuck commented Oct 5, 2015

@raldred If you read through this issue, you'll see that it was closed as wontfix because there's no problem with Compass in Chosen. Compass is strictly a dev dependency, and it works just fine to generate the final product. Chosen itself is just some JS and CSS files plus a couple of images.

If you're having issues with Compass and Rails, then your issues are with Compass and Rails, not Chosen. If you're using chosen-rails, please note that that is a third-party project, and you should open an issue there if you have one with it.

If you download the release version of Chosen, you can include it in your project as-is and not be concerned with Compass at all, which is again just a development dependency of Chosen.

As for the "sorry state" of this and other repos, I can only point you to the license for Chosen, which is very explicit in pointing out that this software is provided as-is with no guarantee of anything. It also gives you permission to fork the source and do whatever you so desire, including removing the Compass dependency. The source was given to you freely to use as-is, or to modify however you'd like.

I'd like to remind you that all of the maintainers of Chosen fill that role voluntarily and as time allows. None of the maintainers is employed to work on open-source software full time. We all have other responsibilities (and lives!). We are also all real-life people who are saddened when people describe our work that we have provided freely and generously as being in a "sorry state". Please have some empathy and realize that there are humans with needs, wants, and dreams on both ends of this interaction.

@raldred
Copy link

raldred commented Oct 5, 2015

@tjschuck thanks for the message. I'm fully aware of the concepts and guarantees offered by open source software, I've spent a lot of my own time building and contributing to projects.

Sorry if you have taken my comments the wrong way, upon reading it back I see how it could have been misinterpreted. I was meant to be a continuation of my comments in #2437 and the specific "sorry state" comment was directed at the Compass repos as an observation of the the lack of activity there NOT at the Chosen project, which is a great tool.

I'm actually a paying customer of harvest so appreciate how useful you and your teams tool's are for devs.

I intended to patch chosen-rails to build css out instead of just blindly including the scss source from Chosen, maximising its compatibility with the rails asset pipeline and removing any possibility of conflict.

I will post a link back for others like me who arrived here from a google search.

@tjschuck
Copy link
Member

tjschuck commented Oct 5, 2015

@raldred Sorry if I misunderstood you -- my apologies. And thanks for understanding.

If you know what the problem is and could patch chosen-rails, that would be 👍 👍, because a lot of people seemingly have issues with it.

As for your comments about the maintenance of Compass, do you have any information you can share about this? In the original issue body, it was mentioned that Compass wasn't well-maintained, and I asked:

Also, Compass is no longer well-maintained? Do you have any reference to it being abandoned by its maintainers to back that up?

If it's actually being abandoned, then we would certainly consider removing it as a dependency, since that's a pretty big liability for Chosen as well. I couldn't find anything notable, though, and the original reporter never provided any additional information about that particular point -- if you can and can share it, that'd be appreciated.

I see that https://github.com/Compass/compass hasn't had a commit to stable since January, but that could be attributed to "stability" just as well as "abandoned".

@raldred
Copy link

raldred commented Oct 5, 2015

@tjschuck No problem at all, I'll sort chosen-rails.

I saw that, like you say there's nothing official to suggest it's abandoned, it was just feeling I got after talking to other devs on my team and at local meetups amongst the ruby community, although I accept this is just hearsay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants