【问题标题】:Rails 3 + Compass + Blueprint not workingRails 3 + Compass + Blueprint 不工作
【发布时间】:2011-06-17 03:06:27
【问题描述】:

我在 Rails 中使用了原版蓝图,效果很好。但是当我尝试通过指南针使用它时,它(网格系统)不知何故不起作用。

以下是我正在遵循的步骤:

指南针初始化导轨

当我去创建模板时:

!!!
%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

这一切都不像蓝图那样简单。我在谷歌上搜索并遇到了一些教程/博客,然后按照它仍然无法正常工作。我尝试过的一些变体是:

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

然后在一个教程中,我发现 body.bp 可以工作,例如:

  %body.bp
    #container

它确实稍微改变了格式,但网格仍然无法正常工作。请帮忙。

【问题讨论】:

  • 我尝试删除 haml-rails gem 并保持最少的 gem。甚至与乘客一起尝试过。仍然没有运气。我一定遗漏了一些明显的东西。请帮忙。

标签: ruby-on-rails-3 blueprint-css compass-sass


【解决方案1】:

终于可以做到了。

%body.bp.two-col

【讨论】:

  • 从那时起,我通过扩展提供的两列布局完成了一个包含三列的设计。指南针真的很酷!
猜你喜欢
  • 2011-10-25
  • 2023-03-21
  • 1970-01-01
  • 2011-09-04
  • 2011-02-23
  • 2012-04-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多