d-cent / patterns

Patterns for d-cent UI development
4 stars 3 forks source link

Should Pattern Lab use Grunt and SASS? #22

Open arokanto opened 10 years ago

arokanto commented 10 years ago

We usually set up the Pattern Lab with Grunt, so that we can easily use a CSS pre-processor like SASS. This would allow us to easily reuse CSS code, use variables, auto-prefixer, etc. Grunt can also automatically minify and combine CSS, JavaScript and HTML, so they will load faster for the end users. And we could use Grunticon, which makes using SVG icons easier.

Is this something that we can set up here as well? We recommend using Grunt, but using it requires all developers to use the same setup, otherwise things will break. At the moment the Pattern Lab is using vanilla CSS.

Here are some links to further info: http://gruntjs.com/ http://sass-lang.com/ https://github.com/filamentgroup/grunticon

jaakkokorhonen commented 10 years ago

I'm happy with any optimisation you @Unkulunkulu have positive experience with. @gvilarino what's you take on Grunt? Was it grunticon or something else you are using at the moment?

I have just used Fontlab to make a new version of a .ttf every time i need to add icons, and am fine with even that. It seems that there is suddenly a wide array of options these days for handling icons.

jaakkokorhonen commented 10 years ago

Voitko päivittää README.md:hen asennusohjeen? Myös Patternlabin asennusohjeen, niin että yksiselitteisesti selviää missä vaiheessa Grunt pitää asentaa.

gvilarino commented 10 years ago

I'm all for optimisations, grunt is a helpful tool.

Still I would advise against SASS. Styl is much more powerful alternative and we're already using it in DemocracyOS. Using other CSS pre-processors will only make the platform more cumbersome to maintain.

So my call would be Styl or plain CSS.

arokanto commented 10 years ago

Great! We'll add Grunt to the project.

As to the CSS preprocessor, we have never used Styl. I checked it out briefly and it seems to do pretty much everything SASS does, so in that sense it doesn't matter which one we choose. I'm just a bit worried that going with Styl is not the most future-proof option. The project seems to have 6 contributors on Github and it hasn't been updated after 2013. Compared to SASS's 148 contributors and constant updates, I'm inclined to favor SASS here. I do agree that having two preprocessors on the same project is not a great idea either.

gvilarino commented 10 years ago

I agree on the maintainers's aspect, though styl is being used on a huge number of projects and it's been proven to work wonders.

Switching DemocracyOS to SASS is not an option in the short-term.

arokanto commented 10 years ago

We'll do some further investigating and get back to this. Thanks for the comments.

gvilarino commented 10 years ago

Actually, I was wrong. We're using stylus which is actively developed, used and mantained.