Search code examples
csssvgsasscompass

What is $experimental-support-for-svg in sass and why is it needed?


I've just upgraded SASS and Compass to fix a problem where the CSS wasn't compiling. All I did was:

gem uninstall sass
gem install sass --no-ri --no-rdoc
gem install compass

After doing that and executing grunt, the CSS now compiles but with the following warning:

WARNING: Compass has changed how browser support is configured. The following configuration    
variables are no longer supported: $experimental-support-for-svg.
Details: http://compass-style.org/help/documentation/tuning-vendor-prefixes/

That link isn't any use, it doesn't tell me anything about the variable that is no longer supported.

I don't understand what $experimental-support-for-svg is and I can't understand why this is used in the sass stylesheets that I'm working with.

Can I safely ignore this or is this going to cause a style problem with another browser?


Solution

  • The warning is just a warning: you can ignore it if you want.

    Prior to Compass 1.0, the $experimental-support-for-svg was used to determine whether or not an SVG was generated as a fallback for browsers that lack support for gradients. Attempting to reference any of the old variables will generate this warning. If you're not using it, then a library you're using probably does.

    If you look at the documentation on gradients, you'll see that there are a new set of configuration variables. If you want to disable generating SVG gradients, it looks like the variable you're looking for is $svg-gradient-shim-threshold (by default, this is set to whatever your $graceful-usage-threshold value is).

    Related: Configure compass browser support (Compass 1.x syntax)