开发者

Rails 3 + Compass + Blueprint not working

I have used vanilla Blueprint with Rails and it work very well. But when I try using it through compass, it (grid system) somehow does not work.

Here are the steps I am following:

compass init rails

When I go and create the template:

!!!
%html
  %head
    %title Test Project
    = stylesheet_link_tag :all
    = javascript_include_tag :defaults
    = stylesheet_link_tag 'screen.css', :media => 'screen, projection'
    = stylesheet_link_tag 'print.css', :media => 'print'
    /开发者_运维问答[if lt IE 8]
    = stylesheet_link_tag 'ie.css', :media => 'screen, projection'
    = csrf_meta_tag
  %body
    .container
      .span-24
        The header
      .span-4
        The first column
      .span-16
        The center column
      .span-4.last
        The last column
      .span-24
        The footer

It all comes as plain unlike blueprint. I Googled and came across some tutorials/blogs and followed then and it still don't work. Some variations of above which I tried are:

compass init rails --using blueprint
compass init rails . --using blueprint
compass init rails . --using blueprint/semantic

Then on one of tutorial I found that, body.bp would work, like:

  %body.bp
    #container

It did changed the formatting a little, but grid is still not working. Please help.


Finally able to do it.

%body.bp.two-col

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜