Embedded CSS Framework

Will the blueprint be the default CSS Framework for the Yii 2.0 ?

Are there any thoughts of switching to something else?

This has been brought up before, see the thread on standardizing ui components.

Short answer is - hopefully not blueprint because even the author of blueprint has abandoned it. It’s probably a toss up between Zurb’s Foundation and Twitter’s Bootstrap

Thanks phpnode

Twitter’s bootstrap would be nice…

Bootstrap would not be nice… because the grid of Foundation is much better.

The last time I checked, the Bootstrap grid was not responsive.

Maybe that has changed by Bootstrap 2 ?

The problem is:

Bootstrap is ‘more complete’, but it is created to ensure a uniform look between applications and is thus difficult to customize.

Foundation is not as complete - whatever that means - but is made to make sure that it’s easy to customize the look to different applications.

It makes sense if you view Bootstrap as Twitters internal web framework which is made to ensure a uniform look across all Twitter applications, and see Foundation as ZURB’s web framework which they use for all kinds of client work.

FYI bootsrap 2.0 was released today: http://twitter.github.com/bootstrap/

I’ve never looked at foundation but found it very easy to integrate bootstrap with some of yii’s components (main menu, gridview, …). It made my backend look much nicer in no time.

Maybe it’s better to continue in the already opened thread http://www.yiiframework.com/forum/index.php?/topic/27261-ui-components-standardization/

Ultimately the decision is up to the Yii team.

But, while Bootstrap is great - especially 2.x - it is a framework, not a foundation.

Which again makes ZURB Foundation rise to the top of my wishlist.

It is a foundation upon which we can build.

Bootstrap is really great, but it is more like an end-product than it is a foundation.

Take a look at this page:

http://foundation.zu…prototyping.php

It is exactly what I would want from a Yii generated app: easy to flesh out a wireframed prototype, for just about any type of site.

Ideally, it should be possible to use both, if designed right.

But, Foundation would also mean that Yii would ship with a smaller framework.

Hey! And this?

http://addyosmani.github.com/jquery-ui-bootstrap/

It’s just a Bootstrap-like skin for jQuery UI.

The ‘already opened thread’ really has little to do with the topic. :)

Okay, my thoughts on Bootstrap versus Foundation:

[size=“3”]If we want Yii applications to look like a lot of other web applications, then the team could play it safe and go for the ‘most popular’ framework: Bootstrap.

Or the Yii team could go for something different, like Foundation, which again makes it possible to give Yii applications that little extra touch of Yii-ness.

[size="2"]Speaking of popularity: Foundation comes as a Ruby gem (sass module) - and Sass/Compass is definitely more popular (and powerful) than Less. Because that has become the default CSS framework for RoR.

Nothing wrong with Less, but it’s not as widely used (yet) as Sass/Compass - for good reasons.

And you can get a stand-alone tool for Sass/Compass too, if you prefer not to install Ruby and/or use the command line.

I won’t beat this dead horse again - that was my final cents.8)

[/size][/size]

It’s the same topic of conversation, the author of the 2nd message (phpnode) realized this too. This thead should be merged to the other thread.

However, as I’ve already explained in the already opened thread, Bootstrap 2 isn’t less customizable than Foundation and it has some advantages over Foundation (which is also good though).

Please consider the Yii-Bootstrap extension using Bootstrap 2

There are a number of HTML5-CSS3 frameworks out there aside from Foundation and Bootstrap, some of which offer dedicated or optional support for jquery, SASS, LESS and other Javascript frameworks.

http://skytechgeek.com/2011/09/12-html5-css-frameworks-for-easy-webdevelopment/

http://www.1stwebdesigner.com/design/20-css3-html5-frameworks-tools-templates/

Boilerplate looks very interesting, supports jquery, mobile agents, and can be built for distribution in standard or custom formats.

http://html5boilerplate.com/html5boilerplate-site/built/en_US/docs/usage/

http://html5boilerplate.com/docs/

http://weblogs.asp.net/dwahlin/archive/2011/06/05/getting-started-using-html5-boilerplate.aspx

Yeah. HTML5 Boilerplate is the mother of it all. ;)

It’s created by Paul Irish, one of the main Chrome devs. IIRC, he’s their dev relations guy.

I think Yii2 needs a CSS framework that is fairly complete so that all demos and tutorials can focus on the glue between the backend and frontend where Yii really shines. So +1 for Twitter’s Bootstrap. It’s mature and feature rich and will serve it’s purpose.

I tried both Foundation 2 and Bootstrap (v1 and v2). Bootstrap has a lot more to offer and it feels more mature than Foundation although I think the fluid grid system of Foundation is way better (and I personally consider responsive layouts to be a really important feature). But with 26000 followers on Github I assume that more people are using (and therefore also testing) Bootstrap than Foundation (3500) which tends to lead to a more robust code base. Anyways, Foundation 3 is coming out in a few weeks and it will be much more focused on better design, so let’s see what they come up with.

btw.: Someone came up with the argument that using Bootstrap will lead to a lot of sites looking the same. Seriously, that can’t be an argument against a CSS framework :) If people are too lazy to add their own CSS all Yii sites would look the same anyway, regardless of the framework behind.

I’ve also now used foundation2 and bootstrap2 and as much as it pains me to say it, I agree, bootstrap is now a better candidate for the default theme. It really does offer a lot of useful features that are missing in foundation, especially things like dropdown menus, forms etc. I find foundation slightly easier to work with and I agree, the responsive grid is a lot nicer, but at the moment it’s seriously lacking compared to bootstrap2. I think the only really useful thing that came out of that flamewar was that what ever the default is, it should be optional.

::)

No real chat has gone on about how this would be implemented and whether an adapter interface can/will be used. I agree with the optional side however.

Welcome to the light side of the Force :D