Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cant figure out why my SASS wont work

Hey I am trying to learn rails and following the rails tutorial. I am adding some elements to the apps style sheets using SCSS and this is what I am adding

/* miscellaneous */

  .debug_dump {
    clear: both;
    float: left;
    width: 100%;
    margin-top: 45px;
    @include box_sizing;
  }
}

but when I go to view my it in a browser I receive this error

Mixin box-sizing is missing argument $boxmodel.
  (in /Users/<mynamehere>/workspace/sample_app/app/assets/stylesheets/custom.css.scss:110)

<html>
    <head>
      <title><%= full_title(yield(:title)) %></title>
      <%= stylesheet_link_tag "application", media: "all",
                                             "data-turbolinks-track" => true %>
      <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
      <%= csrf_meta_tags %>

 Rails.root: /Users/<mynamehere>/workspace/sample_app

Any help would be much appreciated. Here is a link to my github if you need to see anything else

like image 879
frigit Avatar asked Dec 28 '25 15:12

frigit


2 Answers

The error says, you need a argument for box_sizing.

So try @include box-sizing(border-box);.

like image 133
ironsand Avatar answered Dec 30 '25 07:12

ironsand


I made the same mistake. Check again Listing 7.2, there's some extra code there before the "/* Miscellaneous */" part, where you declare what box_sizing is:

@mixin box_sizing {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
like image 42
Dimitris Tzortzis Avatar answered Dec 30 '25 09:12

Dimitris Tzortzis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!