-
Notifications
You must be signed in to change notification settings - Fork 602
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
add sass version #70
add sass version #70
Conversation
Thanks for taking a look here. Flickity CSS is written in plain ol' CSS, which makes it accessible for whatever CSS processor you are using. I'll leave this PR open for a bit in case others find it useful. |
https://gist.github.com/imaginamundo/c2c8ef8e8b191e45ef90 Need to create the variables, but it is a start. Thanks for the awesome plugin. |
@desandro If we are going to use a pre-processor, I'd lean on something like Less. Not because of my personal preference, but because of the tools available out there; like this one from UIkit to convert that to SASS automatically. I'd also like to see Less hooks integrated, which will provide pluggable selectors for Flickity. I'm more than happy to lead this effort, but this makes Flickity possible to extend via Less, Sass, or vanilla CSS. Thanks! |
+1 for pre-processors. Doesn't matter if Sass or Less. :) |
Why Sass/Less version? You should always strive towards plain CSS if possible. |
@silvenon Until sass/sass#193 is implemented, it'd be silly to require this package via bower and then have to manually copy in the styles in order to compile with your main app's styles. Even if that is implemented; if you can have a build tool that can satisfy Less/Sass (including variables for spacing and sizing which Flickity has A LOT of) along with a built CSS file, why would you not? Think you're missing the boat on this. Otherwise you're overriding package defaults when you could have a more precise built file with what you customized. |
But would rewriting the CSS for a preprocessor make it better? Wouldn't you then have to configure Flickity in two places? Also, which preprocessor to choose and why? I don't think CSS should be rewritten with a preprocessor just because currently there might not be a good way to consume it, instead we should push for that solution. I'm pretty new to the Browserify scene, but I think there might be some transforms for that? |
If you "start" with a preprocessor, then your build task; whether it's Grunt or Gulp, can automatically create the "other" preprocessor and the CSS file. The CSS file will have the defaults while the respective preprocessor will provide the flexibility to change said defaults and make it easier to integrate into their project all the while being able to keep not only the JS, but the styles behind it up to date with minimal effort when running |
This is the situation I'm currently in. I started with SASS + JS, but I realized there are a couple of things wrong with that setup:
However, things get weird when |
I can certainly relate to having a system that needs to work with different setups, but to address each of your points:
|
All in all, I see very little point in bothering with CSS preprocessors in this case. Especially because they are eventually going to be replaced with PostCSS. |
Oof guess we'll just have to agree to disagree on this one; think we've both beaten our points into the ground ;) |
Agreed 😃 |
At the very least the |
@tingletech bower.json |
Using a |
Concatenation isn't a good reason to make a Sass version, you can concatenate CSS with a build tool. A Sass version should exist if you have to configure it. |
Allow me to dip in! While I am a big fan of Sass, I don't feel like adding a Sass stylesheet to Flickity makes sense. Flickity is written in plain CSS, which means it can be safely imported in a Sass file. There is no need to have a Sass version. What would be the point? Nesting? Please. And I don't think like a few variables will help that much, in regard to the extra complexity added. Flickity is more like a logic library, heavily focused on the JavaScript behaviour. The styles provided are simple enough for default, and can be safely improved and enhanced without having to rely on a pre-processor dependant stylesheet. Needless to say, you cannot really add a Sass version without eventually adding LESS, Stylus and PostCSS versions. And then, you maintain a whole styling system while you could have staying with CSS, which in this case makes perfect sense. Flickity is not a CSS framework. I'd advise against this PR. Just my 2 cents. :) |
Thanks all for the input. I'm sticking with my guns and leaving Sass out. Time to put this one to rest. 😴 |
No description provided.