【发布时间】:2014-08-02 12:15:24
【问题描述】:
这似乎是一个非常愚蠢的问题,但我在 webkit 覆盖我的 SASS 时遇到了麻烦。
在我看来,我有:
<%= link_to 'New Category', new_category_path, :class => 'button button-new' %>
在 application.css.scss 中:
.button{
font-family: "Verdana", sans-serif;
font-weight: bold;
font-size: 15px;
text-align: center;
border-radius: 3px;
a{
color: #FFF;
text-decoration: none;
}
}
.button-new{
background-color: #428bca;
padding: 1% 2% 1% 2%;
}
但是,我浏览器中的链接颜色是默认的蓝色,带有下划线。当我在开发人员工具下检查元素时,没有看到/读取链接的样式。相反,该链接使用来自用户代理样式表的样式。
我知道我一定是在做一些相当简单的错误,但我终生无法发现它!
【问题讨论】:
标签: css ruby-on-rails sass