Yii extension for Foundation
Foundation is an easy to use, powerful, and flexible framework for building prototypes and production code on any kind of device.
Dive into responsive prototyping with Foundation
GitTip! me :)
Foundation 3 was rebuilt from the ground up to syntactically similar, but not identical, to Foundation 2. Much of what you already know about Foundation applies, including how to use the Grid, many of the common elements, and how the responsive aspects work.
With that being said there are significant differences to be aware of. In some cases, markup had to be modified to support a new case or to be more customizable or extensible. In other cases we've streamlined the framework so that there's less extra styling, so some extraneous classes will no longer take effect.
If you are moving from foundation2 to foundation3 take into account that foundation 3 does not support IE7.
Both IE6 and IE7 have serious issues which make support for them detrimental to the overall experience. Rather than having a single codebase that supports all the way back to those browsers, but is less useful and flexible for everyone, we opted to not support these browsers. Not only do they have extremely small, rapidly dwindling user bases, but not supporting them allows us the use of things like box-sizing: border-box and other tools.
If IE7 support is important for your users / customers, you can use foundation2, which supports IE7.
You may also read the official Zurb migration guide
... 'preload'=>array( ..... 'foundation', // preload the foundation component ), 'components'=>array( ..... // assuming you extracted foundation under extensions 'foundation' => array("class" => "ext.foundation.components.Foundation"), ), ...
Info: This is a work in progress, not all components of foundation are to be found in the Yii extension yet. but you can still use them as you normally would use Foundation.
-Added form prefix and postfix support
Total 10 comments
Hi @Mariaczi+PL and other Foundation fans.
I took a slightly different approach to bundling Foundation 4 with Yii and Giix, just a couple of folders of templates to integrate it.
Posted here if you're interested.
And thanks to @Asgaroth for introducing me to Foundation & Yii.
I'm sorry if this is a dumb question, but all that happened after I took the steps above was that the default widgets in the default right-hand column shot off to the bottom of the page.
Is this correct behavior and now I have to go build a theme based on Foundation, or is this a partial success ... or something else, I guess? Any help much appreciated.
thanks
@Mariaczi+PL : Not yet : github issue 4
Are yoy planning to release Foundation4 for Yii ?
I just saw that cwhite had a problem and it took me 2 minutes to set it up so I thought I would share this.
I copied the whole foundation folder into: /projectName/protected/components/
Then opened this file: /projectName/protected/config/main.php
Added this:
I hope this helps someone.
Thanks for that Chris83, have you had any problems with using this shim?
FounActiveForm.php, line 313 is
should be:
However, even with this fix I see no error formatted like in the Foundation examples (it does not add 'error' class to the input element). To fix this add the following in the beginning of the "error" function in FounActiveForm.php:
Even then forms with client validation don't show proper error style for the input elements and labels, but at least they show the error text.
Normally extensions folder, but who knows, you may want to put it on the components folder, or somewhere else.
'Download the files and extract them to you project's desired folder'
Can you be more specific? I'm new to YII (but not to php). Do these go in the themes folder or in the protected folder?
You can get Foundation3 to work on IE7 using a specific .htc file.
Check out this link https://github.com/Schepp/box-sizing-polyfill/blob/master/boxsizing.htc
It's nice that you started this project Asgaroth so that I don't have to. :)
Leave a comment
Please login to leave your comment.