1

I have been using SASS for a month, love it.

However, when I create a variable such as:

$darkgrey:rgb(82,81,83);

Then decide re-use the variables, say in a specific p tag? In the body:

body{
    p.ahh-whatever{
        color:$darkgrey;
    }
}

However it always seems to come up as a HEX in all browsers. Is there a reason for this? Do I need to use RGBA with 1 Opacity...

Software Being Used:

I also use Foundation 3 inline with Compass-Style. In addition to CodeKit to compile my code, and Sublime Text 2 for my editor. Operating System is OSX 10.8 (New IMac 27").

Any help would be great!

4

1 回答 1

1

SASS will output hex whenever possible, because almost all browsers will understand it. (Not all browsers will "get" RGB values or RGBA values.)

if you do specify a an rgba value, SASS will output it as such

for instance :

rgba(blue, 0.2)    

will output :

rgba(0, 0, 255, 0.2)

see : Sass RGBA instances documentation

于 2013-02-28T10:40:30.460 回答