简体   繁体   中英

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 . But this is what I get.

custom.scss includes:

#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. What could be wrong with it?

Link to Heroku: https://daytonaraceway.herokuapp.com/signup

Thanks

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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