[英]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.