jslegers / cascadeframework

Cascade Framework
Other
276 stars 52 forks source link

Build process? #15

Closed mbrowne closed 11 years ago

mbrowne commented 11 years ago

Hi, I have made a small edit to the core.css for which I would like to submit a pull request, but I think I should concat/minify it into the appropriate files first, so that the change is included in build-core+typography.css, etc. What tool were you using to do the build?

The change I made was to add the new HTML 5 <main> tag as one of the tags to which the clearfix is applied by default. I also thought it would be good to add a comment to the clearfix with a link to what I think is the original page to describes the technique: http://nicolasgallagher.com/micro-clearfix-hack/

(and use content:" " [with a space] rather than content:"" to prevent the Opera bug mentioned in that link.)

jslegers commented 11 years ago

Thanks for your fix. I'll review it ASAP.

mbrowne commented 11 years ago

Since my initial post, I set up a build process using grunt (http://gruntjs.com/) and made the change I mentioned in my fork of the framework. The main issue I ran into with grunt was that unlike the minified CSS files in your distro, the comments at the top of each file still showed up after minification (I think because they start with /*!)...so I deleted those comments manually. Any way around that? What build tool did you use?

I would submit a pull request at this point except that in addition to support for the

tag I've also renamed all the "size" classes to "width" classes to be more precise (and in case of a future "stack" class with "height1of2", etc. classes as I mentioned on the OOCSS forum), but I don't know if you would agree with that renaming. If you do then I'll go ahead and submit a pull request. For now, here's my commit that specifically adds support for the
tag:

https://github.com/mbrowne/cascadeframework/commit/afdc7b8a6bf31012469072325ad9e69b0db08b58

jslegers commented 11 years ago

I like your suggestion to change the "size" classes to "width" classes for the very reason you give. "width" is definitely more future proof and just as easy to comprehend. If you do a copy-paste of all relevant files (CSS + HTML), I will accept your pull request.

For the time being, I use the very painful process of adjusting the code in the "build-full" file, running it through an online version of the YUI compiler for minification and manually copying the changes to the other files. Considering the inefficiency of the method, I put my current focus on the construction of a metaframework built in Sass that should improve the readability of the code, further improve customisability of the framework and automate the process of copying changes to different builds. Interestingly, I saw only just today that Nicolle Sullivan is doing the same with her OOCSS project. I guess Sass is in the air :-)

I have no experience with grunt. I'll check it out once I move my development to a Linux environment (which shouldn't be far ahead in the future). I'm still doing all of my development in Windows 7, but getting tools like Compass, Grunt or Composer to work well in Windows is too much of a pain to continue working like that...

mbrowne commented 11 years ago

Ok, I just submitted a pull request. I added hyphens to for "width-fit" and "width-fill" since I think it makes it more readable. I think it was less of an issue with "sizefit" and "sizefill" - I think the vowel at the end of the word "size" made the hyphen unnecessary for those but "widthfit" and "widthfill" are less readable to me.

I think the move to Sass is a great idea...maybe you could even use Compass, which is based on Sass and includes some useful mixins. On the other hand, I imagine that not everyone who uses Sass would necessarily want to use Compass. In addition to looking for inspiration from the new Sass version of OOCSS, you might also want to check out one of the Sass ports of Bootstrap, e.g. https://github.com/jlong/sass-twitter-bootstrap.

As to Grunt, it might still be useful for minifying the Javascript, although I think maybe the Sass command line tool can handle Javascript too. There's also a nice tool called Yeoman that uses Grunt under the hood and makes it easy to compile all your assets into as few as 2 files if you want - one for CSS and one for JS - and it gives them new names whenever any of the source files changes, to avoid issues with caching. Yeoman uses Bower for package management, so by creating a Bower package for Cascade Framework, you'd make it easy for users of Yeoman or just Bower itself to easily install the framework and take advantage of those features, as has already been done for the Sass port of Bootstrap I mentioned.

It was perhaps premature to mention all of that - for now creating the Sass version in the first place is the priority.

BTW good luck on your migration to Linux. In the meantime, you could run Linux as a virtual machine and set up filesharing so you can easily edit files in the web root of the virtual machine from Windows (in addition to being able to view them from your Windows web browser). You might have already ruled that out in favor of being totally in Linux, just thought I'd mention it.

jslegers commented 11 years ago

Your pull request has been accepted. I also added some more info on the front page (including a link to your documentation site) and a couple of more fixes. Cascade Framework is now officially updated to v1.1

I'll look into all of your suggestions as soon as I find some time for it.

Thanks for your interest and support of the framework.