I am trying to set up my rails forms to have border-box using the following CSS. But it doesn't seem like the css is being applied to my fields and I am not sure why.
Note: I recently updated my app from Bootstrap 2.3 to Bootstrap 3.1. Not sure if this has any effect but I thought it was worth mentioning.
View
<%= f.label :name %>
<%= f.text_field :name %>
<%= f.label :website %>
<%= f.text_field :website %>
<%= f.label :primary_field %>
<%= f.select :primary_field, @primary_field %>
<%= f.label :address %>
<%= f.text_field :address, :placeholder => '123 Test St, City State Zip'%>
<%= f.label :description %>
<%= f.text_area :description, :size => "30x5" %>
<%= f.submit "Add Company", class: "btn btn-large btn-primary" %>
CSS.SCSS File
@mixin box-sizing($box-model) {
-webkit-box-sizing: $box-model; // Safari <= 5
-moz-box-sizing: $box-model; // Firefox <= 19
box-sizing: $box-model;
}
....
input, textarea, select, .uneditable-input, {
border: 1px solid #bbb;
width: 100%;
margin-bottom: 15px;
@include box-sizing(border-box);
}
Picture of the output These boxes should be bigger
