3

New to SASS. Why am I getting the following warning?

$ sass --watch index.s.css:index.css --debug-info
WARNING on line 13 of index.s.css:
This selector doesn't have any properties and will not be rendered.
      error index.s.css (Line 15: Invalid CSS after "border-box": expected expression (e.g. 1px, bold), was ";")

Lines 13–18:

*
{
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

I should note that this has nothing to do with the vendor prefixes, which I’ve tried removing. I also changed box-sizing: border-box to color: pink. Still complains.

Edit: I didn’t realize SASS had two syntaxes, nor that they were selected based on the filename extension. I want to use SCSS, but have to name the files *.s.css because I’m using the Adobe Brackets beta, which currently only has syntax highlighting for plain CSS files. I discovered the --scss flag to force that syntax, but I still get the same error.

Hugh Guiney
  • 1,309
  • 2
  • 19
  • 34
  • Also have a look at http://compass-style.org/ it adds some nice features to SASS. Like browser prefixing. `@include box-sizing(border-box)` is one of them. – Allan Kimmer Jensen Oct 23 '12 at 09:20
  • Might be worth switching back to the normal scss file extension and see if thats the cause. Your code should work in .scss files. I tested it in my local setup. Also, what version of sass are you running? – Will Oct 24 '12 at 01:19
  • Fwiw, Brackets will [add SASS syntax highlighting soon](https://github.com/adobe/brackets/pull/2609). – peterflynn Jan 20 '13 at 20:50
  • `expected expression … was ";"` is typical when sass is expecting the SASS syntax (which has no semicolons) and gets the SCSS syntax instead. Try `--scss` again or with the `scss` extension. – sam Oct 16 '13 at 05:41

1 Answers1

0

You need to write it as:

*
 +box-sizing(border-box)

Try this and see if you still get the same error. If this doesn't work, try selecting some actual elements: div, section, artcle, figure etc.

Kyle
  • 65,599
  • 28
  • 144
  • 152