Sets css classes to be used in menulink.
Argument can an array and will
be transformed into a string

@param string $css

@return MenuItem
960209
public function setCss($css)
    {
        if (is_array($css))
            $css = implode(' ', $css);

        $this->css = $css;

        return $this;
    }
1068799
public function removeCssClass($cssClass)
    {
        if (array_key_exists($cssClass, $this->cssClasses)) {
            unset($this->cssClasses[$cssClass]);
        }
        return $this;
    }
141227
public function convert($html, $css = null)
    {
        $document = $this->createDomDocumentFromHtml($html);
        $processor = new Processor();

        // get all styles from the style-tags
        $rules = $processor->getRules(
            $processor->getCssFromStyleTags($html)
        );

        if ($css !== null) {
            $rules = $processor->getRules($css, $rules);
        }

        $document = $this->inline($document, $rules);

        return $this->getHtmlFromDocument($document);
    }
325241
public function addCss($css)
    {
        $this->addHook(function($document) use ($css) {
            $document->addCss('/'.$css);
        });

        return $this;
    }
917858
public function remove($css)
    {
        /**
         * @var \DOMNode $node
         */
        $query = $this->_document->getQuery();
        foreach ($this->_nodes as $node) {
            foreach ($query->css($css, $node) as $node2) {
                $node2->parentNode->removeChild($node2);
            }
        }

        return $this;
    }
278385
public function get($css = null, $compress = true)
    {
        if (null === $css) {
            foreach ((array) $this->_list as $src) {
                if (!file_exists($src)) {
                    continue;
                }

                $css .= file_get_contents($src);
            }
        }

        $this->_list = [];

        return $compress ? $this->parse($css) : $css;
    }
503219
protected function handleCssImports($css)
    {
        if ($this->options['bubbleCssImports']) {
            // bubble CSS imports
            preg_match_all('/@import.*?;/', $css, $imports);
            $css = implode('', $imports[0]) . preg_replace('/@import.*?;/', '', $css);

            return $css;
        }

        if ('' === $this->options['importWarning']) {
            return $css;
        }

        // remove comments so we don't mistake { in a comment as a block
        $noCommentCss = preg_replace('@/\\*[\\s\\S]*?\\*/@', '', $css);
        $lastImportPos = strrpos($noCommentCss, '@import');
        $firstBlockPos = strpos($noCommentCss, '{');
        if (false !== $lastImportPos
            && false !== $firstBlockPos
            && $firstBlockPos < $lastImportPos
        ) {
            // { appears before @import : prepend warning
            $css = $this->options['importWarning'] . $css;
        }

        return $css;
    }
1313966
public function addInternal($css, array $attr = null, $pos = 100)
    {
        $style = $this->style($css, $attr);
        $this->addElement($pos, $style);
        return $this;
    }
395088
private static function fixShadows($css) {
		$css = preg_replace_callback(self::$patterns['box_shadow'], function ($matches) {
			return $matches[1] . self::flipSign($matches[2]);
		}, $css);

		$css = preg_replace_callback(self::$patterns['text_shadow1'], function ($matches) {
			return $matches[1] . $matches[2] . $matches[3] . self::flipSign($matches[4]);
		}, $css);

		$css = preg_replace_callback(self::$patterns['text_shadow2'], function ($matches) {
			return $matches[1] . $matches[2] . $matches[3] . self::flipSign($matches[4]);
		}, $css);

		$css = preg_replace_callback(self::$patterns['text_shadow3'], function ($matches) {
			return $matches[1] . self::flipSign($matches[2]);
		}, $css);

		return $css;
	}
1098713
protected function addStyleElementToDocument($css)
    {
        $styleElement = $this->domDocument->createElement('style', $css);
        $styleAttribute = $this->domDocument->createAttribute('type');
        $styleAttribute->value = 'text/css';
        $styleElement->appendChild($styleAttribute);

        $headElement = $this->getHeadElement();
        $headElement->appendChild($styleElement);
    }
369674
public function convertBackgroundRepeat($css)
    {
        switch ($css) {
            case 'repeat':
                return array(true, true);
            case 'repeat-x':
                return array(true, false);
            case 'repeat-y':
                return array(false, true);
            case 'no-repeat':
                return array(false, false);
        }
        return null;
    }
1337521
public static function rewriteUris($css, $options = array())
    {
        // Prepend the base URL and symlink schema so the proper root path gets prepended.
        $symlinks = array();

        if (is_link($_SERVER['DOCUMENT_ROOT'])) {
            $symlinks = array(
                '/'.$options['baseUrl'] => readlink($_SERVER['DOCUMENT_ROOT'])
            );
        }

        return \Minify_CSS_UriRewriter::rewrite($css, $options['currentDir'], $_SERVER['DOCUMENT_ROOT'], $symlinks);
    }
105162
public static function cssStringToArray($css)
    {
        $statements = explode(';', preg_replace('/\s+/s', ' ', $css));
        $styles = array();
        foreach ($statements as $statement) {
            $statement = trim($statement);
            if ('' === $statement) {
                continue;
            }
            $p = strpos($statement, ':');
            if ($p <= 0) {
                continue;
            } // invalid statement, just ignore it
            $key = trim(substr($statement, 0, $p));
            $value = trim(substr($statement, $p + 1));
            $styles[$key] = $value;
        }
        return $styles;
    }
809932
public function parent($css = null)
    {
        if ($css === '') {
            return clone  $this;
        }

        return $this->css('parent::' . ($css === null ? '*' : $css));
    }
1010100
public function readBorder($css)
    {
        // border none
        $none = array('type' => 'none', 'width' => 0, 'color' => array(0, 0, 0));

        // default value
        $type  = 'solid';
        $width = $this->convertToMM('1pt');
        $color = array(0, 0, 0);

        // clean up the values
        $css = explode(' ', $css);
        foreach ($css as $k => $v) {
            $v = trim($v);
            if ($v) $css[$k] = $v;
            else    unset($css[$k]);
        }
        $css = array_values($css);

        // read the values
        $res = null;
        foreach ($css as $value) {

            // if no border => return none
            if ($value=='none' || $value=='hidden') {
                return $none;
            }

            // try to convert the value as a distance
            $tmp = $this->convertToMM($value);

            // if the convert is ok => it is a width
            if ($tmp!==null) {
                $width = $tmp;
            // else, it could be the type
            } else if (in_array($value, array('solid', 'dotted', 'dashed', 'double'))) {
                $type = $value;
            // else, it could be the color
            } else {
                $tmp = $this->convertToColor($value, $res);
                if ($res) $color = $tmp;
            }
        }

        // if no witdh => return none
        if (!$width) return $none;

        // return the border properties
        return array('type' => $type, 'width' => $width, 'color' => $color);
    }
988908
private function getCss($cssFiles = array())
    {
        $css = '';
        foreach ($cssFiles as $file) {
            if (file_exists($file)) {
                $css .= file_get_contents($file) . "\n";
            }
        }
        return $css;
    }
1037371
public function css($css) {
        $css = trim($css);
        if (substr($css, -1) !== ';') {
            $css = $css . ';';
        }
        return $this->att(['style' => $css]);
    }