Convert a Sass string into CSS output.

 input - The Sass String to convert.

 Returns the CSS formatted String.
199478
def sassify(input)
      site = @context.registers[:site]
      converter = site.find_converter_instance(Bunto::Converters::Sass)
      converter.convert(input)
    end
363084
function processCss(cssData) {
    var CSS_PROCESSORS = [stripInlineComments, autoprefixer, cssnano];
    var process$ = postcss(CSS_PROCESSORS).process(cssData.toString('utf8'));
    return rxjs_1.from(process$);
}
708403
public function css($string)
    {
        if (!$string) {
            return $string;
        }

        $string = $this->toUtf8($string);
        if ($string === '' || ctype_digit($string)) {
            return $string;
        }

        $result = preg_replace_callback('/[^a-z0-9]/iSu', $this->cssMatcher, $string);
        return $this->fromUtf8($result);
    }
990674
function css(property) {
        if (cssCache[property] === undefined) {
            var domProperty = property.
                replace(/(-[\s\S])/g, function(c) { return c.charAt(1).toUpperCase(); });
            var prefixedDom = style(domProperty);
            cssCache[property] = domToCss(prefixedDom);
        }
        return cssCache[property];
    }
406798
function gli_color_to_css(color) {
    var res = (color & 0xFFFFFF).toString(16);
    while (res.length < 6) {
        res = '0' + res;
    }
    return '#' + res.toUpperCase();
}
1006573
def selector_to_str(value)
      return value.value if value.is_a?(Sass::Script::String)
      return unless value.is_a?(Sass::Script::List)

      if value.separator == :comma
        return value.to_a.map do |complex|
          next complex.value if complex.is_a?(Sass::Script::String)
          return unless complex.is_a?(Sass::Script::List) && complex.separator == :space
          return unless (str = selector_to_str(complex))
          str
        end.join(', ')
      end

      value.to_a.map do |compound|
        return unless compound.is_a?(Sass::Script::String)
        compound.value
      end.join(' ')
    end
1236678
def process_styles (out)
      out.gsub /(<style\b[^>]*?>([\s\S]*?)<\/style>)\s*/i do
        css = $2
        m = $1.gsub /^<style\s([^>]+)>/i do |m|
          attrs(m, 'style', true)
        end
        begin
          css_compressed = MultiCss.min css
          m.gsub!(css, css_compressed)
        rescue Exception => e
          log e.message
        end
        reserve m
      end
    end
331027
def format_original_error(self):
        
        # TODO eventually we'll have sass-specific errors that will want nicer
        # "names" in browser display and stderr
        return "".join((
            type(self.exc).__name__, ": ", six.text_type(self.exc), "\n",
        ))
186590
function sourceString(source) {
  var message = "<css input>"
  if (source) {
    if (source.input && source.input.file) {
      message = source.input.file
    }
    if (source.start) {
      message += ":" + source.start.line + ":" + source.start.column
    }
  }

  return message
}
286224
def color_validator(input_str):
    
    try:
        assert input_str in VALID_OVERRIDE_COLORS + ['']
        return input_str
    except AssertionError:
        raise ValidationError(
                'Expected colors are: ' +
                ', '.join(color for color in VALID_OVERRIDE_COLORS) +
                '. (Ctrl-C to exit)\n')
230237
String createCssContentString() {
        StringBuilder css = new StringBuilder();
        css.append("<style>\n");

        // html, body
        css.append("html, body {");
        css.append("margin: 0;");
        css.append("}\n");
        // body
        css.append("body {");
        css.append("background-color: #152935;");
        css.append("font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;");
        css.append("}\n");
        // .container
        css.append("." + HTML_CLASS_CONTAINER + " {");
        css.append("display: flex;");
        css.append("min-height: 100vh;");
        css.append("}\n");
        // .side
        css.append("." + HTML_CLASS_SIDE + " {");
        css.append("max-width: 33%;");
        css.append("flex: 1;");
        css.append("display: flex;");
        css.append("}\n");
        // .main
        css.append("." + HTML_CLASS_MAIN_CONTENT + " {");
        css.append("background-color: white;");
        css.append("min-width: 300px;");
        css.append("max-width: 40%;");
        css.append("padding: 0px 20px;");
        css.append("}\n");
        // .social_media
        css.append("." + HTML_CLASS_SOCIAL_MEDIA + " {");
        css.append("padding-top: 50px;");
        css.append("}\n");
        // header
        css.append("header {");
        css.append("color: #152935;");
        css.append("font-size: 1.2em;");
        css.append("font-weight: bold;");
        css.append("text-align: center;");
        css.append("padding-bottom: 10px;");
        css.append("}\n");
        // .buttons
        css.append("." + HTML_CLASS_BUTTONS + " {");
        css.append("display: flex;");
        css.append("flex-flow: row wrap;");
        css.append("justify-content: center;");
        css.append("text-align: center;");
        css.append("}\n");
        // fieldset
        css.append(HTML_CLASS_FIELDSET + " {");
        css.append("border: 0;");
        css.append("padding: 0;");
        css.append("}\n");
        // legend
        css.append(HTML_CLASS_LEGEND + " {");
        css.append("color: #152935;");
        css.append("padding-bottom: 10px;");
        css.append("}\n");
        // .button
        css.append("." + HTML_CLASS_BUTTON + " {");
        css.append("background-color: white;");
        css.append("border: 2px solid #2A4E7B;");
        css.append("cursor: pointer;");
        css.append("font-weight: 200;");
        css.append("font-size: 0.9em;");
        css.append("padding: 10px 30px;");
        css.append("text-align: center;");
        css.append("}\n");
        // .button:hover, .button:focus
        css.append("." + HTML_CLASS_BUTTON + ":hover, ." + HTML_CLASS_BUTTON + ":focus {");
        css.append("background-color: #4178BE;");
        css.append("color: white;");
        css.append("}\n");
        // .medium
        css.append("." + HTML_CLASS_MEDIUM + " {");
        css.append("margin: 10px;");
        css.append("width: 250px;");
        css.append("}\n");
        // .mid_section
        css.append("." + HTML_CLASS_MID_SECTION + " {");
        css.append("padding: 30px 0px;");
        css.append("text-align: center");
        css.append("}\n");
        // .or
        css.append("." + HTML_CLASS_OR + " {");
        css.append("overflow: hidden;");
        css.append("text-align: center;");
        css.append("}\n");
        // .or:before, .or:after
        css.append("." + HTML_CLASS_OR + ":before, ." + HTML_CLASS_OR + ":after {");
        css.append("background-color: #C0C0C0;");
        css.append("content: \"\";");
        css.append("display: inline-block;");
        css.append("height: 1px;");
        css.append("position: relative;");
        css.append("vertical-align: middle;");
        css.append("width: 47%;");
        css.append("}\n");
        // .or:before
        css.append("." + HTML_CLASS_OR + ":before {");
        css.append("right: 0.5em;");
        css.append("margin-left: -40%;");
        css.append("}\n");
        // .or:after
        css.append("." + HTML_CLASS_OR + ":after {");
        css.append("left: 0.5em;");
        css.append("margin-right: -40%;");
        css.append("}\n");
        // .credentials .inputs
        css.append("." + HTML_CLASS_CREDENTIALS + " ." + HTML_CLASS_CRED_INPUTS + " {");
        css.append("padding: 0px 20px;");
        css.append("}\n");
        // label
        css.append(HTML_CLASS_LABEL + " {");
        css.append("font-size: 0.8em;");
        css.append("color: #777;");
        css.append("}\n");
        // .cred_input
        css.append("." + HTML_CLASS_CRED_INPUT + " {");
        css.append("box-sizing: border-box;");
        css.append("margin-bottom: 15px;");
        css.append("padding: 10px;");
        css.append("max-width: none;");
        css.append("width: 100%;");
        css.append("}\n");
        // .submit
        css.append("." + HTML_CLASS_SUBMIT + " {");
        css.append("width: 100%;");
        css.append("}\n");

        css.append("</style>\n");
        return css.toString();
    }
1174910
def scssify(input)
      site = @context.registers[:site]
      converter = site.find_converter_instance(Bunto::Converters::Scss)
      converter.convert(input)
    end
833819
def css_html(self):
        
        output = io.StringIO()

        for item in self.css():
            output.write(
                self.render_asset_html(item, settings.CODEMIRROR_CSS_ASSET_TAG)
            )

        content = output.getvalue()
        output.close()

        return content
868247
def compile_sass(input_file, output_file):
    
    from .modules import sass

    if not isinstance(input_file, str):
        raise RuntimeError('SASS compiler takes only a single input file.')

    return {
        'dependencies_fn': sass.sass_dependencies,
        'compiler_fn': sass.sass_compile,
        'input': input_file,
        'output': output_file,
        'kwargs': {},
    }
187067
def html_to_rgb(colorstring):
    
    colorstring = colorstring.strip()
    if colorstring[0] == '#':
        colorstring = colorstring[1:]

    if len(colorstring) != 6:
        raise ValueError("input #%s is not in #RRGGBB format" % colorstring)

    r, g, b = colorstring[:2], colorstring[2:4], colorstring[4:]
    r, g, b = [int(n, 16) for n in (r, g, b)]

    return (r, g, b, 255)
1305452
def wrap_css_lines(css, line_length):
    """"""

    lines = []
    line_start = 0
    for i, char in enumerate(css):
        # It's safe to break after `}` characters.
        if char == '}' and (i - line_start >= line_length):
            lines.append(css[line_start:i + 1])
            line_start = i + 1

    if line_start < len(css):
        lines.append(css[line_start:])
    return '\n'.join(lines)
1063440
function convertColorComponent (input) {
  let result = input.toString(16);
  if (result.length < 2) {
    result = '0' + result
  }
  return result;
}