#417 Foundation
ZURB's Foundation is a front-end for quickly building applications and prototypes. It is similar to Twitter Bootstrap but uses Sass instead of LESS. Here you will learn the basics of the grid system, navigation, tooltips and more.
- Download:
- source code
- mp4
- m4v
- webm
- ogv
If we're changing our "foundation_and_overrides.scss" file, what happens if we update zurb foundation? Will this file be overwritten?
Simply updating the 'zurb-foundation' gem will not overwrite 'foundation_and_overrides.scss' or any of the other files in your assets folder.
However, if you then proceed to run
rails generate foundation:install
again, it will overwrite 'foundation_and_overrides.scss' (but not without prompting you for confirmation first). That generator will also modify 'application.css', 'application.js', and 'application.html.erb'.hello
It's good !
Thank for your response!
helpful
Thanks a lot, it has clear a lots of thing.
Really helpful !
Super helpful
Nice ! Thanks
It's really sad that ther is no more new videos
I handle this by keeping my edits clean, and in place of the existing options. So, rather than putting all of my customizations in one place in the file, they're spread out in the locations where the options originally appeared.
Then, I accept the changes from
rails generate foundation:install
for thefoundation_and_overrides.scss
file - allowing it to overwrite my customizations. I handle the difference(s) in git, by staging/committing all the lines that don't affect me & comparing the lines that do affect my customizations.So far, I've generally been able to discard the changes to
application.html.erb
- I just take a quick peek at the diff from within therails generate foundation:install
command to be sure.Thank your explain !
No news for more explanation ?
It's best to just browse the gem's github repo for changes. I organize my files a little differently than default, so I don't want those changes over ride.
Thank !
Yeah I agree !
Thanks you very much !
Very interesting, thank you.
Nice railscast about a framework I use everyday.
About forms, to avoid the extra HTML that foundation requires, and also to have nice error rendering, I did a gem foundation_rails_helper that works with rails 3 and 4 and with foundation 3 and 4.
It has also an helper for flash messages
HTH
Seb
True !
If you want to have error highlighting on forms, I'd recommend using simple_form, which supports Zurb by using
rails generate simple_form:install --foundation
https://github.com/plataformatec/simple_form#zurb-foundation-3
Event if it's foundation 3, I think it works with current version 4.
Form css haven't changed that's much.
Here is how I handle Simple_Form errors and foundation 4 ( by default I prefer to use field labels as prepends. Enjoy
With Field labels,
THX Nick
I'm not a huge fan of simpleform this is why I did the foundation_rails_helper
I really like Foundation, using it for projects since version 2. However I think the biggest advantage is to move all the logic of the grid into your stylesheets, and decouple the HTML. So your HTML will not be messed up with a lot of presentational classes and the result will be a lot more semantic. Unfortunately this episode didn't show this feature at all :(
Be sure to check out the Building With Mixins section over at the Foundation Grid docs.
That sounds like a nice feature. I wonder if there are any major downsides.
I too was hoping this episode would touch on using mixins and what some best practices might be. Personally I think mixins are the killer feature Foundation has over Bootstrap. Great screencast nonetheless and thank you Ryan for putting it together, here's to hoping for a PRO episode for semantic Foundation :-D
I too was hoping this episode would touch on using mixins and what some best practices might be. Personally I think mixins are the killer feature Foundation has over Bootstrap. Great screencast nonetheless and thank you Ryan for putting it together, here's to hoping for a PRO episode for semantic Foundation :-D
Just what I've thought while watching this episode and what I was wondering of. Thanks, Mario
One of the biggest advantage (in my opinion) of Zurb compare to Bootstrap is the customisation.
Really easy with Zurb instead of fighting with existing bootstrap styles.
We used it on http://www.moviebreak.de/
It is a German Movie Website.
We had trouble with the mobile first aspect on IE8, because IE8 doesn't support media queries.
I hated to use !important all the time to override Foundation defaults.
Have you tried JS libraries that add media queries support to IE7 and IE8, like Respond.js?
No, I didn't know that those exist!
Thank you!
Respond.js will make Foundation work. I would suggest adding it right after your stylesheets to prevent flash.
Also for IE7 support you will need the box-sizing polyfill found here https://github.com/Schepp/box-sizing-polyfill
fgfgd
fgfgd
no.
Do custom form in zurb work on ajax? I am not able to to get it to work. I have the form in reveal modal loaded using ajax. But the select boxes are not custom. Anyone have a clue?
if your form is preloaded with the page it should work. Foundation uses javascript to create custom select, checkboxes and radiobuttons, if you load it on demand you need to run the custom-form javascript after.
Example:
For more information check Foundation - Javascript
ok cool, that worked. i just did:
I wonder if there is also a way to add custom select box without wrapping it in tag?
Big fan of Foundation. Thanks for another great screencast!
Just wanted to point out a small typo on the application.html.erb code in the show notes. The section is closed with a closing div tag on line 18.
I saw that too. My first instinct was to look up whether or not this is some new HTML5 thing, but then I decided that Ryan might actually be human and it is just a mistake.
Nice! Would like to see the Foundation's Javascript widgets compared to Bootstrap's.
hey, how do you open that color selection dialog?
I have the same question. i think its a widget for mac editor.
https://github.com/weslly/ColorPicker
For interested in I encourage to check another solution: InK
Wow, just had a look at Interface Kit (InK), it's really nice. I think I prefer it over Twitter Bootstrap. I looked at Zurb Foundation quite a while back, might need to re-evaluate it too. Thanks for sharing!
Awesome screencast. For anyone attending LoneStarRuby we'll be running a Foundation training on Thursday morning.
Spent whole day attempting to adapt Foundation to my existing application with simple_form. Nothing is works out of box, and documentation for Twitter Bootstrap is way better.
Excellent screencast,
I've been using it for a while, imho bootstrap is easier to use, but foundation is easier to customize
For those using turbolinks, you will need to modify the application layout to include all assets in the header. Foundation includes javascript in the body by default.
Thanks for the tip :). Easy solution to what I thought might get uglier.
If I include all the JS assets in the head everything seems to broke...
Does it work for you? Have you modify anything else?
It's working, so far its been smooth sailing. I also set the
data-turbolinks-track
attribute to true.<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
+1
You don't need to change the import at the bottom. On line #63 of the
foundation_and_overrides.scss
file there is a list of all the modules and you can just set the one you don't want to false and they'll be excluded.Looks like the section element is being closed with a div instead of section.
I'm trying to make the nav-bar collapsible but I'm not sure how to do it. Using the code above did not work. From inspection I see I need to have the toggle element but I'm unsure how to use it.
I'm seeing the same thing. The right navigation elements disappear when the page is narrow.
Changing the pasted in navigation code to this worked for me:
Thanks! This worked for me too. but after the first time it stopped working. I am using rails4. Any ideas?
For what it's worth, bootstrap has a SASS version. Take a look at the bootstrap-sass gem.
I did try to add one other tooltip to the price field
But it's not working. The first tooltip is displayed on the 2 labels !
Any idea ?
Thanks for reporting. If a value of data-tooltip is set then this value is used to identify the tooltip itself. Since in this case both are
data-tooltip="true"
when generated, both point to the same tooltip.Try this:
Nice to know! Thanks
Nice tutorial! Love it!
I don't know if it's only me but i need to put this in /app/assets/stylesheets/config.rb :
require "zurb-foundation"
Because when I modified the bootstrap_and_overrides, appeared an error file.
I hope it helps someone
(Sorry for the caveman english)
Finding Foundation to be a nice addition to speeding up workflow nowadays :)
I'm using Rails 4, and after trying to import other files after a successful setup of foundation I'm still getting an error with the mixings... "File to import not found or unreadable: foundation/variables." whenever I add "@import "foundation/variables";" to any of the sass style files
do you have the gem in the assets group? Rails 4 has done away with the assets group so try removing that group and running bundle install again.
Foundation seems to interfere with TinyMCE 4.x, does anybody experienced that?
AFAIK Foundatiom overwrites style for
table
tags.I found a very nice collection of Foundation themes: http://www.themplio.com/categories/foundation-themes
Has anyone been able to install Foundation 5?
Yes I have,
The gem was renamed to "foundation-rails" but still works like the old one.
...
Thank you very much Florian!
With Foundation 5.0.3, I needed to follow this crazy thread to get the mixin import working: https://github.com/zurb/foundation/issues/2128. The final suggested work-around is what worked for me.
Nice episode
when i try to change the color of the top bar in foundation_and_overrides.scss the color of the bar in the app doesn't change , i'ved tried to stop the rails server and started it again but the color doesn't change
ruby 2.1.0
rails 4.0.3
the code that i'ved change
// $topbar-bg-color: #000;
// $topbar-bg: $topbar-bg-color;
codenapse-team: I'm sorry if this sounds too obvious, but the code you posted still had the comment characters ('//') on each line. If you'd like to change the color, the line should look like this:
$topbar-bg-color: #9c1;
BTW http://teatro.io/ will help you test it
Quite Interesting! :)
Very interesting!
Tes
Very nice! :)
Get the latest coupons codes, promo codes, deals, printable coupons for thousands of stores on couponbirds such as lane bryant coupon, hsn coupon code and gymboree coupon.
Nice !
Thank you.
Gracias!
Yes you are right that the above video helped me learn about basics of the grid system, navigation, tool tips etc.Bootstrap is not a new one for me and i have project experience in bootstrap and this video helped me to know more about it.
good job
Download ShowBox — movies and TV shows for the whole family you can watch on your Android smartphone, and even better on tablets! Showbox Here is the direct download link to get latest movies on Android smartphones
so?
Looks interesting
Grat alternative to Bootstrap !
Thanks for the tips and guide. It is very useful tips.
I enjoy the subject you are talking about. It very interesting! Thanks for sharing!
Thank you for the information! very good article!
Thanks
Thanks you my friend !
thnks full for this article
Mantap Jiwa. Thanks for this information.
Thanks for this information.
thanks for the info
Very useful information! Thank you very much!
Thanks for this article
Thank you for your work on the blog! You're doing a good job!
Very well written information. It will be beneficial i really appreciate all your efforts ,thank you so mch for sharing this valuable information with all of us.
packers-movers-bangalore.in
One of the best episode.
Thanks a lot for this episode, love the way you present your informations. Really usefull for people like me
annuaire-expert-comptable.ma/
I also want to learn the basics of the grid system, navigation. Thanks for reviewing, I will refer more.
This is very nice blog and informative. I have searched many sites but was not able to get information same as your site. I really like the ideas and very interesting to read so much and Please Update and i would love to read more from your site
Thanks
This is my first time i visit here. I found so many entertaining stuff in your blog, especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the leisure here! Keep up the excellent work.
Thanks a lot, i confirm that's a really nice ad. I hope you will have some more in future.
Wow that is what I was looking for, thanks a lot for sharing this..!
I found a lot of interesting information here. A really good post, very thankful and hopeful that you will write many more posts like this one.
Good post, thanks.
Very interesting! Thanks!
This is very nice blog and informative.
Thanks for the article, I was looking for information on this topic, helped a lot.
Wonderfull JOB, this helps me well
good well soon baby
Yes, the article I was looking for. Your article gives me another approach on the subject. I hope to read more articles from you.
This is very helpful post. Thanks for sharing it
hii
hihi
very good discussion for my insights, such as information about
Great episode!
Awesome blog!
piraterinsta.appastuce. com
piratersnap.appastuce. com
Thanks for sharing, very useful information. Please visit to my website.
Wao , what a nice article. Really loved the way you posted and shared the beautiful information.
Weldone.!!
YTD Video Downloader
great review guys!
Sorry if I bother you. You can visit my website.
weird tips
natural face
make up attractive face
familiar makeup principles
I loved the post, keep posting interesting posts. I will be a regular reader..
Cheap Essay Writing Services UK - UKEssayPapers
I loved the post, keep posting interesting posts. I will be a regular reader..
Cheap Essay Writing Services UK - UKEssayPapers
Thanks for this
Great, thank for clearing that up
First time here at the site, I like the layout.
hoho nice to know you guys
thanks for sharing
nice info
Thanks for the episode. Gonna try it.
Thanks for the sharing this information, Visit this site for Free psn code generator pcmunkey.net.
This is the kind of manual that needs to be given and not the random misinformation that's at the other blogs.
It was great info thanks for sharing.
softwareskey.net
Recently I discovered that the phrase “Thanks be to God” occurs exactly five times in the Bible, and only in the consecutive books of Romans, 1 Corinthians, and ...