【问题标题】:Padrino Sass in Haml not working哈姆尔的帕德里诺·萨斯(Padrino Sass)不工作
【发布时间】:2014-09-26 05:38:34
【问题描述】:

我是 Padrino 的新手,对 sample blog tutorial 来自 padrinorb.com 的 haml/sass 几乎一无所知。我在示例项目中包含了 sass gem。

当我运行示例项目时,对 app/stylesheets 中的 application.sass 所做的更改不会反映在我的 haml 中,直到我包含/链接 public/stylesheets 中的生成的 application.css。即我的样式只有在我的haml中包含以下行时才有效

 %link(rel="stylesheet" type="text/css" href="stylesheets/application.css")

我的疑问是示例博客 padrinorb.com 项目的自动链接是如何发生的,而不是我需要手动链接的示例项目?

【问题讨论】:

  • 你按照here的说明操作了吗?

标签: ruby sass sinatra haml padrino


【解决方案1】:

感谢 Iain,我的错误是我在代码中遗漏了以下行,导致 css 未包含在内。对于任何也被卡住的人,下面的行只是一种将样式表与您的 haml 链接的 padrino 方式。把它写在你的 haml 头部,就像你写一个 CSS 一样。

= stylesheet_link_tag 'reset', 'application'

【讨论】:

    猜你喜欢
    • 2014-03-01
    • 1970-01-01
    • 1970-01-01
    • 2013-03-19
    • 2021-04-14
    • 2012-07-01
    • 2013-07-05
    • 1970-01-01
    • 2011-02-03
    相关资源
    最近更新 更多