Sass mixin not compiling?
I have previously made a mixin in sass 2.2.22 for my font sizes(it's a font converter), like so:
=6.5pts
:font
:size 9px
It has been working ever since i first made it a year ago. We开发者_如何学JAVA just upgraded to haml/sass 3 and now whenever I try to refresh the page im working on, a sass compile error appears like so:
http://grab.by/4yFE
I don't get it since Sass 3 documentation says that the = declaration for mixins is NOT deprecated. I tried uninstalling haml 3.0, restarted my server and deleted the generated css file and now it apparently works. Problem is, I need haml 3 for another related project where we just started using Compass.
Why is the compiler complaining when the documentation claims the declaration is not deprecated?
Does SASS-latest continue permit mixin names a) beginning with a numeral and b) containing a period?
From the SASS docs, "SassScript variable and mixin names may now contain hyphens. In fact, they may be any valid CSS3 identifier." This tells me that text which does not constitute a valid CSS3 identifier may not constitute a valid SASS variable or mixin name.
From the CSS docs, "In CSS, identifiers (including element names, classes, and IDs in selectors) can contain only the characters [a-zA-Z0-9] and ISO 10646 characters U+00A1 and higher, plus the hyphen (-) and the underscore (_); they cannot start with a digit, or a hyphen followed by a digit." Note that the period has Unicode codepoint U+002E.
If SASS-earlier let you get away with variable and mixin names either beginning with a numeral or containing a period, then this behavior might never have been intended and might now have been dropped from support.
Something to look into.
you probably need to put it like this:
=6.5pts font: size: 9px
see a perfect example in the reference: http://sass-lang.com/docs/yardoc/file.INDENTED_SYNTAX.html#mixin_directives
精彩评论