How do I use a "*" CSS wildcard selector when using SASS? For instance, how would I make the following CSS code SASSy?
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
line-height: 1;
}
*:before,
*:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
Edit:
Thank you for the answers so far, but let me clarify. I realize that there are many different perspectives on the code sample. The code sample is not the question. The question remains, how do I use the *
selector? The SASS parser throws a syntax error when it encounters the *
and says that it encountered *
, but expected a selector. I'm using Sass 3.4.19 (Selective Steve) on Mac OSX 10.9.5.
Edit 2:
I have found the solution. The error was being cause by a missing ;
in a file that was included on the line immediately preceding the *
code block. Such is the life of dealing with other people's code. I'm going to award the answer to @torazaburo since he was the only one who actually addressed the question and made me rethink other possibilities.
*
would work differently in a CSS preprocessor than in regular CSS? By the way,box-sizing
requires no vendor prefix.*
selector. Please see my edit.*
would work differently in a CSS preprocessor than in regular CSS?, so that would have been a really good time for the OP to pipe up about the*
not working for him at all, in which case things would have gone in a much different direction. As it was, the question simply seemed to be about modifying some CSS that happened to involved the asterisk to be more SASS like.