Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Since you're using Compass to compile, you can add a custom Sass importers in the Compass config file. For example, compiling using <code>compass compile -c config.rb</code>, you would include something like this in your <code>config.rb</code> file:</p> <pre><code>require File.join(File.dirname(__FILE__), 'importer.rb') Sass.load_paths &lt;&lt; Sass::Importers::Custom.new() </code></pre> <p>Then in <code>importer.rb</code> in the same directory, you would include your importer definition:</p> <pre><code>module Sass module Importers class Custom &lt; Base def find(name, options) if name == '[globals]' options[:syntax] = :scss options[:filename] = 'globals' options[:importer] = self return Sass::Engine.new("$imported-variable: blue;", options) else return nil end end def find_relative(uri, base, options) nil end def key(uri, options) [self.class.name + ":" + uri, uri] end def mtime(uri, options) nil end def to_s '[custom]' end end end end </code></pre> <p>Then in your Sass file you can use the importer: </p> <pre class="lang-css prettyprint-override"><code>@import '[globals]'; p { color: $imported-variable; } </code></pre> <p>Of course, this is just a dummy implementation that only accepts a URI matching <code>"[globals]"</code>. You'll need to supply your own implementation that accesses your MySQL database, as I don't have any experience with database access in Ruby. Hopefully this should get you a little closer, though, in addition to the links that @Sean has provided.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload