You are here

private static function SassPropertyNode::isPseudoSelector in Sassy 7

Same name and namespace in other branches
  1. 7.3 phpsass/tree/SassPropertyNode.php \SassPropertyNode::isPseudoSelector()

* Returns a value indicating if the string starts with a pseudo selector. * This is used to reject pseudo selectors as property values as, for example, * "a:hover" and "text-decoration:underline" look the same to the property * match regex. * It will also match interpolation to allow for constructs such as * content:#{$pos} * *

Parameters

string the string to test: * @return bool true if the string starts with a pseudo selector, false if not

See also

isa()

1 call to SassPropertyNode::isPseudoSelector()
SassPropertyNode::isa in phamlp/sass/tree/SassPropertyNode.php
* Returns a value indicating if the token represents this type of node. *

File

phamlp/sass/tree/SassPropertyNode.php, line 245

Class

SassPropertyNode
SassPropertyNode class. Represents a CSS property. @package PHamlP @subpackage Sass.tree

Code

private static function isPseudoSelector($string) {
  preg_match(self::MATCH_PSUEDO_SELECTOR, $string, $matches);
  return isset($matches[0]) && in_array($matches[0], self::$psuedoSelectors) || preg_match(self::MATCH_INTERPOLATION, $string);
}