简体   繁体   English

Hartl Rails教程第7章错误仍然为黑色的字段

[英]Hartl Rails Tutorial Chapter 7 field with error still black

In part 7.3.3 all input fields with class="form_control" nested in divs with class="field_with_errors" should be colored red . 在部分7.3.3与所有输入字段class="form_control"嵌套在与div的class="field_with_errors" 应该被着色为红色 But this is what I get. 但这就是我得到的。

custom.scss includes: custom.scss包括:

#error_explanation {
  color: red;
  ul {
    color: red;
    margin: 0 0 30px 0;
  }
}

.field_with_errors {
  @extend .has-error;
  .form-control {
    color: $state-danger-text;
  }
}

As you can see from the screenshot #error_explanation works well, .field_with_errors does not. 正如你可以从看截图 #error_explanation效果很好, .field_with_errors没有。 What could be wrong with it? 这可能是什么问题?

Link to Heroku: https://daytonaraceway.herokuapp.com/signup 链接到Heroku: https : //daytonaraceway.herokuapp.com/signup

Thanks 谢谢

html模板的代码中有一个错字,因此将输入字段class: 'form_control'更改为class: 'form-control'解决了该问题

暂无
暂无

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

相关问题 Michael Hartl的Rails教程第8章中的问题-CSS期望 - Trouble in Chapter 8 of Michael Hartl's Rails Tutorial - CSS Expects 在Michael Hartl(出色的)Rails教程的第7章,练习2 - On Chapter 7, Excercise 2, of Michael Hartl's (excellent) Rails Tutorial 调试信息显示为页脚的一部分,仅显示一行? Michael Hartl的Ruby on Rails教程第7章 - Debug Information Shown as Part of Footer and Displaying Only One Line? Michael Hartl's Ruby on Rails Tutorial Chapter 7 在Michael Hartl的Rail教程的第10章中,CSS没有更新 - CSS not updating in Chapter 10 of Michael Hartl's Rail's tutorial Michael Hartl Rails教程-CSS无法正确呈现 - Michael Hartl Rails Tutorial - CSS not rendering properly Hartl Rails教程清单11.25-用于微博的CSS不会更新 - Hartl Rails Tutorial listing 11.25 — CSS for microposts does not update 间距/ CSS问题? -Michael Hartl撰写的Ruby on Rails教程 - Spacing/CSS Issue? - The Ruby on Rails Tutorial by Michael Hartl Hartl 教程 Ch。 8 javascript 下拉菜单不会下拉,用户无法登出 - Hartl tutorial Ch. 8 the dropdown menu via javascript will not drop down and user cannot log out Michael Hartl的Railstutorial:清单7.32:用于测试错误消息的模板 - Michael Hartl's Railstutorial : Listing 7.32: A template for tests of the error messages Lynda.com Rails教程中出现错误“ Subjects#index中的ExecJS :: ProgramError” - Getting Error “ExecJS::ProgramError in Subjects#index” in Lynda.com Rails Tutorial
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM