简体   繁体   English

如何在我的Rails应用程序中安装Susy?

[英]How do I install Susy in my Rails App?

So far in my Gemfile i included 到目前为止,我的Gemfile中已包含

# Gemfile gem 'sass-rails', '~> 5.0' gem 'susy'

# config/application.rb require 'susy'

I ran "bundle install" with no errors. 我运行了“捆绑安装”,没有错误。 Now i'm trying to write normal Susy and just set up the app: 现在,我尝试编写普通的Susy并设置应用程序:

$susy: ( columns: 12, /* we want our page to have 12 columns */ gutters: 3/4, /* space between columns with be 3/4 of a column */ math: fluid, output: float, gutter-position: inside, );

Now when i try and call Susy methods to set up columns, i'm getting errors! 现在,当我尝试调用Susy方法设置列时,出现了错误! I tried a simple column on an element: 我在元素上尝试了一个简单的专栏:

.example{ @include span(3 of 12) ;}

Any ideas? 有任何想法吗? Am i missing something in the install process? 我在安装过程中缺少什么吗?

You'll need to @import 'susy'; 您需要@ @import 'susy'; somewhere in your Sass files, before you can call Susy methods. 在调用Susy方法之前,请在Sass文件中的某个位置进行操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM