src/PleasingPrefixFilter.php
protected function prefixCss( $content )
  {
    $replaced = array();
    if( $rules = $this->getRules( $content ) )
    {
      foreach( $rules as $rule )
      {
        $prefixed = array();
        if( strpos( $content, $rule->getRaw() ) !== false && !in_array( $rule->getRaw(), $replaced ) )
        {

          if( array_key_exists( $rule->getProperty(), $this->prefixValue ) )
          {
            if( array_key_exists( $rule->getValue(), $this->prefixValue[ $rule->getProperty() ] ) )
            {
              $prefixed = $this->getPrefixRules( $rule->getProperty(), $this->prefixValue[ $rule->getProperty() ][ $rule->getValue() ], $rule->getBang() );
            }
          }
          elseif( array_key_exists( $rule->getProperty(), $this->prefixProperty ) )
          {
            $prefixed = $this->getPrefixRules( $this->prefixProperty[ $rule->getProperty() ], $rule->getValue(), $rule->getBang() );
          }
          elseif( array_key_exists( $rule->getProperty(), $this->prefixMethod ) )
          {
            $method = $this->prefixMethod[ $rule->getProperty() ];
            $prefixed  = $this->$method( $rule->getValue(), $rule->getBang() );
          }

          if( !empty( $prefixed ) )
          {
            $newRules = array();
            foreach( $prefixed as $pRule )
            {
              /** @var CssRule $pRule */
              $pRule->setTemplate( $rule->getTemplate() );
              $newRules[] = $pRule->getOutput();
            }

            $replaced[] = $rule->getRaw();
            $replacement = str_replace( $rule->getOutput(), implode( "\n", $newRules ), $rule->getRaw() );
            $content = str_replace($rule->getRaw(),$replacement,$content);

          }
        }
      }
    }

    return $content;
  }
protected function prefixCss( $content )
  {
    $replaced = array();
    if( $rules = $this->getRules( $content ) )
    {
      foreach( $rules as $rule )
      {
        $prefixed = array();
        if( strpos( $content, $rule->getRaw() ) !== false && !in_array( $rule->getRaw(), $replaced ) )
        {

          if( array_key_exists( $rule->getProperty(), $this->prefixValue ) )
          {
            if( array_key_exists( $rule->getValue(), $this->prefixValue[ $rule->getProperty() ] ) )
            {
              $prefixed = $this->getPrefixRules( $rule->getProperty(), $this->prefixValue[ $rule->getProperty() ][ $rule->getValue() ], $rule->getBang() );
            }
          }
          elseif( array_key_exists( $rule->getProperty(), $this->prefixProperty ) )
          {
            $prefixed = $this->getPrefixRules( $this->prefixProperty[ $rule->getProperty() ], $rule->getValue(), $rule->getBang() );
          }
          elseif( array_key_exists( $rule->getProperty(), $this->prefixMethod ) )
          {
            $method = $this->prefixMethod[ $rule->getProperty() ];
            $prefixed  = $this->$method( $rule->getValue(), $rule->getBang() );
          }

          if( !empty( $prefixed ) )
          {
            $newRules = array();
            foreach( $prefixed as $pRule )
            {
              /** @var CssRule $pRule */
              $pRule->setTemplate( $rule->getTemplate() );
              $newRules[] = $pRule->getOutput();
            }

            $replaced[] = $rule->getRaw();
            $replacement = str_replace( $rule->getOutput(), implode( "\n", $newRules ), $rule->getRaw() );
            $content = str_replace($rule->getRaw(),$replacement,$content);

          }
        }
      }
    }

    return $content;
  }
Finds individual CSS rules and evaluates them for needed prefixes, then replaces the rules with the prefixed rule
as needed.

@param string $content   The CSS, without prefixes.

@return string           The CSS with prefixes.