Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (27 sloc) 0.8 kB
<?php
/**
*
* Extend argument objects.
*
*/
class CssCrush_ExtendArg
{
public $pointer;
public $name;
public $pseudo;
public function __construct ( $name )
{
$this->name = $name;
if ( ! preg_match( CssCrush_Regex::$patt->ident, $this->name ) ) {
// Not a regular name: Some kind of selector so normalize it for later comparison
$this->name = CssCrush_Selector::makeReadableSelector( $this->name );
// If applying the pseudo on output store
if ( substr( $this->name, -1 ) === '!' ) {
$this->name = rtrim( $this->name, ' !' );
if ( preg_match( '!\:\:?[\w-]+$!', $this->name, $m ) ) {
$this->pseudo = $m[0];
}
}
}
}
}
Jump to Line
Something went wrong with that request. Please try again.