Passing in variable values when calling `sass` from command line -


this question asked few months ago ended not having answer i'm wondering if in time 1 has come up.

i want use mixins turn relative url's absolute ones without hard-coding host in file. i'm not using rails or ruby ... rendering standalone, called web server written in different language. it'd nice able specify base/host during command line call -- server supplying proper protocol, host, port, etc. sass tack on relative url's @ end of.

the 'solution' last question had asker didn't need functionality. maybe can way?

(i'd rather not interpolate entire sass file pre-processing script)

the functionality seek part of compass. use url helper functions assets (images, stylesheets, fonts)

.foo {     background-image: image_url('my-image.png'); } 

the config.rb options relevant question are:

  • http_path
  • images_dir
  • relative_assets

(see configuration variables)

if want have settings different development vs production mode, can this:

if environment == :production     relative_assets = true elsif environment == :development     relative_assets = false end 

to change modes, command requires addition of environment flag:

compass compile -e production 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -